in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Help with a MSSQL Convert

Last post 09-02-2010 2:22 PM by tknman0700. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-02-2010 2:22 PM

    Help with a MSSQL Convert

    I am trying to convert my MS SQL knowledge into SQLite and having a bit of a problem... my biggest concern here is lack of variable and stored procedure support so I am trying to understand how to make this all work.

     When I do this... 

     

      Dim sql As String = "insert into tblRecords2(CRC) values ('866A463AF32A4BF102E532AAD9E621');insert into tblDataRecords(dataID,chunkID,chunkSequence) values (1, last_insert_rowid(),1)"
                Dim slc As New SQLite.SQLiteConnection("data source=C:\Users\m001kah\Desktop\Services.db")
                Dim slcmd As New SQLite.SQLiteCommand(slc)
                Dim slda As New SQLite.SQLiteDataAdapter()

                slda.SelectCommand = slcmd
                slda.Fill(dt)

                If Not IsNothing(dt) Then
                    If dt.Rows.Count > 0 Then
                        chunkID = dt.Rows(0).Item(0)
                    End If
                End If

    I get an exception:  Value cannot be null. Parameter name: s

    First off I dont know that this means... help please.

    Secondly I have been testing the SQL statement in SQLRazor and I see that the last_insert_rowid() is 0 but the insert into tblRecords2 actually worked.... arghh.. please advise.

     

    Thanks

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems