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

Discussion in 'QnA (read only)' started by digiFriend, May 5, 2006.

Thread Status:
Not open for further replies.
  1. digiFriend

    digiFriend New Member

    Joined:
    Mar 5, 2006
    Messages:
    266
    Likes Received:
    2
    Trophy Points:
    0
    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
     
  2. it_waaznt_me

    it_waaznt_me Coming back to life ..

    Joined:
    Nov 30, 2003
    Messages:
    2,023
    Likes Received:
    10
    Trophy Points:
    38
    Location:
    A bit closer to heaven
    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 ..
     
  3. OP
    OP
    digiFriend

    digiFriend New Member

    Joined:
    Mar 5, 2006
    Messages:
    266
    Likes Received:
    2
    Trophy Points:
    0
    thanks for reply ..................................................
     
Thread Status:
Not open for further replies.

Share This Page