Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Write String with Comma doesn't work
Message
 
To
22/06/2000 21:21:18
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00383549
Message ID:
00384263
Views:
39
>Anyone could help? I encountered "Error occurred" message when
>trying to write a String of data with Comma in it into a table.
>I recorded the error description as "Microsoft Cursor Engine".

This is really curious. I just tried your code with the NWIND database, and it is working!!! Try it too!

This error may have relation to your field definition. Are you sure that your field is long enough?
Option Explicit

Private cnn1 As ADODB.Connection
Private rsCust As ADODB.Recordset

Private Sub Command1_Click()
    rsCust.Open "Select * from employees", cnn1, adOpenKeyset, adLockOptimistic
    Set DataGrid1.DataSource = rsCust
    DataGrid1.Refresh
End Sub

Private Sub Command2_Click()
    With rsCust
        .AddNew
        !LastName = "Moreau"
        !FirstName = "Eric"
        !Title = "Analyst, programmer"
    End With
End Sub

Private Sub Form_Load()
    Set cnn1 = New ADODB.Connection
    Set rsCust = New ADODB.Recordset
    
    cnn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Projets VB\NWIND.mdb;Persist Security Info=False;"
    cnn1.CursorLocation = adUseClient
    cnn1.Open
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform