Private Sub Command_creatnewbase_Click() Set MySQL_Conn = New ADODB.Connection MySQL_Conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _ & "SERVER=" & Text_srvbd.Text & ";" _ & "DATABASE=;" _ & "UID=" & Text_myuser.Text & ";" _ & "PWD=" & Text_mypass.Text & ";" MySQL_Conn.Open MySQL_Conn.Execute "CREATE DATABASE " & Text_nomdb.Text MySQL_Conn.Close MySQL_Conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _ & "SERVER=" & Text_srvbd.Text & ";" _ & "DATABASE=" & Text_nomdb.Text & ";" _ & "UID=" & Text_myuser.Text & ";" _ & "PWD=" & Text_mypass.Text & ";" MySQL_Conn.Open 'Structure de la table `constante` MySQL_Conn.Execute "CREATE TABLE constante (NID int primary key auto_increment," _ & "Timer int NOT NULL," _ & "log tinytext NOT NULL," _ & "DebugLog text NOT NULL, " _ & "SourceTRF text," _ & "srv_services text NOT NULL," _ & "source text NOT NULL)" 'Structure de la table `CopiesFichiersV2` MySQL_Conn.Execute "CREATE TABLE CopiesFichiersV2 (NID int primary key auto_increment," _ & "Masques text NOT NULL, " _ & "Destination text)" 'Structure de la table `CopiesFichiersBuro` MySQL_Conn.Execute "CREATE TABLE CopiesFichiersBuro (NID int primary key auto_increment," _ & "Masques text NOT NULL, " _ & "Destination text," _ & "Retraitement text)" End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question