MySQL Forums
Forum List  »  Newbie

ado and table with "-"
Posted by: sal ss
Date: September 01, 2018 08:39AM

my vb 6.0 code:

Option Explicit
'************************************
Dim CN As ADODB.Connection
Dim RS As ADODB.Recordset
Private Sub Form_Load()

Set CN = New ADODB.Connection
Set RS = New ADODB.Recordset

'Dim TABELLA As Variant
'TABELLA = "statistica"

CN.ConnectionString = "DRIVER={MySQL ODBC 5.3 ANSI Driver};" & "SERVER=192.168.1.3;" & " DATABASE=test;" & "UID=root;PWD=xxxx;"
CN.Open

'RS.Open "select * from 082018", CN, adOpenDynamic, adLockOptimistic ' first line
RS.Open "select * from 08-2018", CN, adOpenDynamic, adLockOptimistic ' second line

End Sub

whn i open the recordset with the first line, all is ok!
But with the second line have error!

peraphs is the special character "-" in name of table?

Options: ReplyQuote


Subject
Written By
Posted
ado and table with "-"
September 01, 2018 08:39AM
September 01, 2018 10:38AM
September 01, 2018 01:39PM
September 01, 2018 03:37PM
September 03, 2018 05:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.