We have an application which uses Microsoft SQL Server 2005 Extended 
stored procedures in conjunction with Sqlite databases. We have a C++ DLL which 
uses the following code to insert rows into a SQLite database:

   

sprintf(Command,"INSERT INTO [Keys] ([Key], [Cluster], "

"[DupeGroup]) VALUES (\"%s\", \"%*.*s\", %d)",

MCKey,BlockSize,BlockSize,MCKey,DupeGroup);

 

 



while (Keys->Execute(Command)==SQLITE_BUSY) {

  #if defined(__unix)

      sleep(dRETRYDELAY);

  #else

      Sleep(dRETRYDELAY*1000);

#endif

}

 

   We use SQL Server 2005 Extended Stored Procedures and User Defined functions 
in the following manner in order to insert into the SQLite table using the 
above C++ code:

 

UPDATE MyTestDatabase SET

MatchKey = master.dbo.mdMUIncrementalBuildKeyEx(@Incremental, @Matchcode, 
Column12, Column53, Column52, Address, NULL, NULL, NULL, NULL, NULL, NULL),

@RetVal = master.dbo.mdMUIncrementalAddRecord(@Incremental),

Status = master.dbo.mdMUIncrementalGetStatusCode(@Incremental),

DupeGroup = master.dbo.mdMUIncrementalGetDupeGroup(@Incremental)

 

    When we run this UPDATE statement from two SQL Server 2005 Management 
Studio clients concurrently, one of the client processes returns with the error 
code Database is locked and the other client process is suspended. Has anyone 
seen this problem? Is it a SQL Server 2005 problem or does it have anything to 
do with Sqlite? In particular, we are wondering why we get the SQLite error 
message "database is locked" when we are running concurrent SQL Server client 
processes? When we run just one SQL Server client process, everything works 
fine and we get no SQLite error messages. Thank you. 

     
                                          
_________________________________________________________________
Bing brings you maps, menus, and reviews organized in one place.
http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to