Scusami, ti porto un esempio completo... oggi sono in vena :-)
codice:<% Dim co Dim strTestTab strTestTab = "Driver={MySQL ODBC 3.51 Driver};server=localhost;port=3306;Database=testremoto;UID=xxx;PWD=xx;" Sub istanzia_co Set co = server.CreateObject("ADODB.Connection") End Sub 'istanzia Sub apri_co(db) co.Open(db) End Sub 'apri_co Sub chiudi_co co.Close End Sub 'pulisci_objCon sub ripulisci_co Set co = Nothing End Sub Function crea_tabella istanzia_co apri_co(strTestTab) dim cmd cmd = "create table nuovaTabella (" &_ "userId int(10) not null auto_increment, "&_ "PRIMARY KEY (userId) "&_ ");" co.execute(cmd) chiudi_co ripulisci_co End Function 'crea_tabella crea_tabella %>
... non fare caso a sub e function, ho solo riadattato un vecchio test![]()

Rispondi quotando