Sorry, but what did dou mean with 'Are you still using VisualFoxPro...'?
:)
Mensaje citado por: "Ruiz González, Jose de Jesus" <[EMAIL PROTECTED]>:
> Are you still using VisualFoxPro as the programmig language in your
> project?
> If so, you can use SQL functions from VisualFoxPro to connect to mySQL
> using
> ODBC
>
> Install mySQL (if you have not allready do it )
> Then install MyODBC-3.51.06.exe (downloadable from mySQL page)
> Create the ODBC bridge to mySQL with the ODBC Administrator
>
> If your project is OO then you can understand the next code I wrote
> (Whith
> this classes I connecto to Oracle, SQL Server
> and, of course mySQL )
>
> COdbc
>^ ^
>| |
> COdbcSynchBatchMan COdbcSynchBatchNotrans
> ^ ^ ^
> | | |
> CORACLECSQLSERVER CMYSQL
>
> Instantiate a CMYSQL object and you are ready
>
> * //
> define class COdbc as custom
> protected m_sClsNam
> protected m_sSourceName && CO
> protected m_sUserID && ops$jjr
> protected m_sPassword && jjr
> protected m_iConnectionID && numero devuelto por
> sqlconnect
> protected m_sCursorResults && cursor en que se
> devuelven los datos
> protected m_sCursorColumns && cursor en que estan los nombres
> de las columnas SQLCOLUMNS
> protected m_sCursorTables && cursor en que estan los
> nombres de la tablas SQLTABLES
> protected m_bInTransaction && bandera para indicar si
> se esta en transaccion o no
> protected m_sErrorString&& cadena con mensaje de
> error
> protected m_sLogFile&& ruta y nombre de archivo
> log
> protected m_bLoggingOut && ¿Logging?
> protected m_oLogFile&& CTextFile
> protected m_sSqlCmd
> protected m_sScriptsPath
> protected m_iIdiom && idioma a usar
> para los nombres de meses
>
> **
> * ts1: SourceName
> * ts2: UserId
> * ts3: Password
> procedure Init
> parameter ts1, ts2, ts3
> this.m_sClsNam = 'Codbc'
> this.m_sSourceName = ts1
> this.m_sUserID = ts2
> this.m_sPassword = ts3
> this.m_iConnectionID = -1
> this.m_sCursorResults = ''
> this.m_sCursorColumns = ''
> this.m_sCursorTables = ''
> this.m_sErrorString = ''
> this.m_sLogFile = TEMPDIR + 'codbc.log'
> this.m_bLoggingOut = .F.
> this.m_sSqlCmd = ''
> this.m_sScriptsPath = 'd:\fpw25\importa\oracle\scripts\'
> this.m_iIdiom = THIs.GENGLISH()
> endproc
>
> *
> procedure destroy
> if this.m_bLoggingOut
> this.SetLogOff
> endif
> if this.m_iConnectionID # -1
> this.Disconnect
> endif
> endproc
>
>
> function GStillExecuting
> return 0
>
> **
> function GFinished
> return 1
>
>
> function GNoMoreData
> return 2
>
> **
> function GSystemTables
> return "'SYSTEM TABLE'"
>
>
> function GTables
> return "'TABLE'"
>
> ***
> function GViews
> return "'VIEW'"
>
>
> function GDBComplete
> return 1
>
> **
> function GDBPrompt
> return 2
>
>
> function GDBNoPrompt
> return 3
>
> ***
> function GTransAuto
> return 1
>
> *
> function GTransManual
> return 2
>
> **
> function GAsynchronous
> return .T.
>
> *
> function GSynchronous
> return .F.
>
> ***
> function GBatchMode
> return .T.
>
> *
> function GNoBatchMode
> return .F.
>
>
> function Connect
> local m.bRet
>
> ? 'COdbc::Connect()'
> m.bRet = .T.
> this.m_iConnectionID = SQLCONNECT( this.m_sSourceName,
> this.m_sUserID, this.m_sPassword )
> ? this.m_iConnectionID
> if this.m