Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 w/ Access: Error Question

Status
Not open for further replies.

kellyputty

Technical User
Jul 28, 2005
29
0
0
US
I get the following error message from my VB interface when attempting to change an entry in a textbox (Balance):

Binding Collection Error:
Field not updatable, Bound Property Name: Text, Field Name: Balance


I think it either has to do with the text box itself (it is not locked) or the database, however, I haven't attempted an update yet so not sure.

If it is the database, do I need to give the program permissions to write to it?

Thanks in advance,
Kelly Putty
 
Kelly Putty

Probably it is the connection opened to the database (rights of the user???) or the way you opened your recordset. Would you show us how you open them...?
 
sure:

Code:
Private Sub Form_Load()
    Set conMB = New ADODB.Connection
    Set rsCustomer = New ADODB.Recordset
    Set rsCustomerAccount = New ADODB.Recordset
  
    conMB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Persist Security Info=False;Data Source=" & App.Path & _
        "\MB.mdb;Mode = readwrite"

    conMB.Open
    With rsCustomer
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open "Select * from Customer", conMB, , , adCmdText
        Set txtCustomerID.DataSource = rsCustomer
        Set txtLastName.DataSource = rsCustomer
        Set txtFirstName.DataSource = rsCustomer
    End With


   With rsCustomerAccount
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open "Select * from CustomerAccount WHERE  CustomerID = '" & txtCustomerID & " ' ", conMB, , , adCmdText
        Set dbcAccountID.RowSource = rsCustomerAccount
        
   End With
   DisplayRecordCount
    
End Sub

Thanks,
KellyPutty
 
Never mind, in another area I closed the connection and that is why I was getting that error. Oops!

Thanks,
Kelly Tessitore
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top