MySQL Forums
Forum List  »  Italian

errore con nome tabella e caratteri speciali
Posted by: sal ss
Date: September 01, 2018 01:56PM

Secondo me i nomi delle tabelle con caratteri speciali non sono aceetati da mysql.
con 08-2018 ho errore, se rinomino la tabella con 082018 funziona!!!

Codice vb6:
Option Explicit
Private Sub Form_Load()

Dim CNN As Connection
Dim rs As Recordset
Dim ssql As String
Dim serverip As String
Dim port As String
Dim user As String
Dim datebasename As String
Dim password As String
Dim table_name As String

serverip = "localhost"
port = "3306"
datebasename = "test"
user = "root"
password = "sal21"

table_name = "08-2008"

Set CNN = New Connection
CNN.ConnectionString = "DRIVER={MySQL ODBC 5.3 ansi Driver};" _
& "SERVER=" & serverip & ";" _
& " DATABASE=" & datebasename & ";" _
& " PORT=" & port & ";" _
& "UID=" & user & ";PWD=" & password & "; OPTION=3"

CNN.Open

Set rs = New Recordset
ssql = "select * from '" & table_name & "'"

rs.Open ssql, CNN
Set rs = Nothing

CNN.Close
Set CNN = Nothing
MsgBox ("upload complete")

End Sub

Options: ReplyQuote


Subject
Views
Written By
Posted
errore con nome tabella e caratteri speciali
47
September 01, 2018 01:56PM


Sorry, only registered users may post in this forum.

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.