General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
Write String with Comma doesn't work
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".
Below is my coding.
'(Declared Public variables for cnn1 and rsCust)
Set cnn1 = New ADODB.Connection
Set rsCust = New ADODB.Recordset
cnn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=C:\TTDental\TTDental.mdb;Persist Security Info=False;
Jet OLEDB:Database Password=123"
cnn1.CursorLocation = adUseClient
cnn1.Open
rsCust.Open "Select * from customer", cnn1, adOpenKeyset,
adLockOptimistic
Set DataGrid1.DataSource = rsCust
DataGrid1.Refresh
'In "ADD" click button, adding a record into Customer table
With rsCust
.AddNew
!IndexNo = "T001"
!Name = "Albert Tan"
' ===This part is giving me problem, with Comma in it===
!Address1 = "29 Senoko Way, Singapore 123456"
' ======================================================
!Address2 = "#01-12"
End With
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only