Hi,
I have written a simple code in VB.NET and using MSACCESS.
1-Try
sqlstr = "INSERT INTO acbill (acbillno,acbilldate,amt,type,drawnby,status,amtre main,designation) VALUES ('" & txtacbillno.Text & "',#" & txtacbilldate.Text & "#," & txtamount.Text & ",'" & ddldepart.SelectedItem.Text & "','" & ddldrawnby.SelectedItem.Text & "','" & ddlstatus.SelectedItem.Text & "'," & txtamount.Text & ",'" & ddldesignation.SelectedItem.Text & "')"
2- Dim Cmd As New OleDb.OleDbCommand(sqlstr, con)
3- Dim RESULT As Integer
4->>>> RESULT = Cmd.ExecuteNonQuery()
5-
6- Catch e1 As Exception
7- Response.Write(e1.ToString)
8- End Try
The same code is running on my office computer but not on my computer.
previously database shows that it is read-only. then i made a new database with same name and deleted the previous data. Now still i m having the same problem -- line no 4 is showing error.But the insert command is running in MACCESS SQL query window.
If i m running the vb.net code and my database is open then it shows error that some one else is using the database and you r not allowed to open it.I have made connection on page_load and close it on page_unload