Hi,

I am trying to update an SQLite 3 database in ASP (code attached) having made the connection using the ODBC driver sqlite3odbc.dll. It gives the following error:

Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
attempt to write a readonly database (8)


However, I am able to issue the SELECT query in the ASP code which works fine. Also, the database allows SELECT/INSERT/UPDATE/DELETE from the command prompt using the interactive sqlite3.exe without any problems.

How can I open the database for read/write so that I am able to insert/update/delete rows in the SQLite 3 database. An early reply would be highly appreciated.

Regards

Sabu.

Code:
<&#37;

Dim conn, rs, strSQL

set conn=Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
conn.connectionstring="Driver=SQLite3 ODBC Driver;Database=H:\skmweb\r15\skmtest1.db;"
conn.Mode=3
conn.open

strSQL = "select a.fld1, b.fld2 from tbl1 a, tbl2 b "
strSQL = strSQL & "where b.fld1 = a.fld1 "
rs.open strSQL, conn

Do While Not rs.EOF
	Response.Write "Record Value: " & rs("fld1") & " ---- " & rs("fld2") & "<br>"
	rs.MoveNext
Loop
rs.Close

strSQL="update tbl2 set fld2 = 'Kolkata' where fld1 = 25 "
conn.Execute strSQL
strSQL="update tbl2 set fld2 = 'Bangalore' where fld1 = 12 "
conn.Execute strSQL

set rs = Nothing
conn.Close
set conn = Nothing

%>