vb6 and mssql server7 (can't update,database or object is read-only)

Status
Not open for further replies.

digiFriend

In the zone
vb6 and mssql server7. (both software are in same desktop pc)

whenever "add'button is pressed it give "3027" error.
RUN-time error '3027'
can't update,database or object is read-only

how to update database . it show dynaset type recordset in vb ADD-Ins-visual data manager,from there also it deny update.
--------------------------------------------------------------------



Dim db As Database
Dim rs As Recordset

Set db = OpenDatabase("rockysql", False, False, "odbc:uid=sa;pwd=")
Set rs = db.OpenRecordset("shopper")

'odbc data source name "rockysql" ,table name ="shopper"



Private Sub Cmdadd_Click() 'command for add button
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
rs.AddNew
End Sub
 

it_waaznt_me

Coming back to life ..
First there should be an rs.Update method too ...
What basically your code does is blank all the text boxes and wait for user to enter the data ... Now put another command buttond and set rs.Update in its Click event ..
 
Status
Not open for further replies.
Top Bottom