Mr. Rao:
You have right is MSSQL, not MySQL , typing error
its ok with the connection chain
selects, inserts, deletes do without problem
but i cant créate table
it got this error
Error BASE/1004 Message not found: LOGICAL:EXEC
Gente:
Estoy migrando mis tablas de dbf a sql, logro conectarme, hacer consultas, pero necesito crear tablas, es ahi donde no puedo
sale el msje de arriba
- Code: Select all Expand view
xPROVIDER := "SQLOLEDB"
xSOURCE := "PYSASERVER"
xCATALOG := "PysaBD"
xUSERID := "sa"
xPASSWORD := "Pysa123456"
xConnect := 'Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xCATALOG+';User Id='+xUSERID+';Password='+xPASSWORD
TRY
oCon1 := CreateObject( "ADODB.Connection" )
oCon1:Open( xConnect )
CATCH oError
MsgStop( oError:Description )
END
// first option not run
cSQL := "CREATE TABLE Bin"
cSQL += "( "
cSQL += "[BIN] char(50) NOT NULL, "
cSQL += "CONSTRAINT PK_BIN PRIMARY KEY ( BIN )"
cSQL += " )"
// second option also not run
//cSql:="CREATE TABLE IF NOT EXISTS regtempo AS (SELECT * FROM cabguia)"
Try
oCon1:Execute( cSQL )
Catch
MsgInfo( "Table Create BIN Failed" )
End try