Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP and Firebird database
Message
De
08/03/2005 09:32:30
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
VFP and Firebird database
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows XP
Divers
Thread ID:
00993615
Message ID:
00993615
Vues:
91
I have a local connection with a Firebird database using an OleDB provider.
Locally I can do all the things I want, but when I change the connection string to my server, he succesfully connects to database but I receive an error (see the following code):

Public PConnect
PConnect = Createobject('ADODB.Connection')
Wait Windows 'Estabelecendo conexão... Aguarde...' Nowait

* ===Local string connection===
*lstring = 'provider=iboledb;location=localhost:;character set=WIN1252;data *source=c:\rh\sgbd\rhsystem.gdb'

* ===Server string connection===
lstring = 'provider=iboledb;location=192.168.20.142:;character set=WIN1252;data source=\\douglas\público\rhsystem.gdb'string

PConnect.Open( lstring, "SYSDBA", "masterkey" )

Wait Clear
If PConnect.State # 1 Then
Messagebox('Não foi possível estabeler a conexão com o servidor de dados.', 64, 'Visual Folhamatic')
Return .F.
Else
Messagebox('Conexão bem sucedida', 64, 'Visual Folhamatic')
Endif

lObjUsuarioEcrm = Createobject('AdoDB.RecordSet')
lObjUsuarioEcrm.CursorLocation = 3
lObjUsuarioEcrm.CursorType = 2
lObjUsuarioEcrm.LockType = 4
lObjUsuarioEcrm.ActiveConnection = PConnect
***
lCarQuery = 'select * from colaboradores'
lObjUsuarioEcrm.Open( lCarQuery ) && ===Error occurs in this line!===
lObjUsuarioEcrm.movefirst
Do While !( lObjUsuarioEcrm.Eof )
Messagebox( lObjUsuarioEcrm.Fields( "colaborador" ).Value )
lObjUsuarioEcrm.movenext
Enddo

The error message is:
OLE IDispatch exception code 0 from IbOleDb: Dynamic SQL Error
-SQL error code = -901
-feature is not supported..

Please, someone can help me to solve this?
Emerson Santon Reed
"One Developer CAN Make a Difference. A community CAN make a future." - Craig Boyd
Répondre
Fil
Voir

Click here to load this message in the networking platform