Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and Firebird database
Message
From
08/03/2005 09:32:30
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brazil
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
VFP and Firebird database
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows XP
Miscellaneous
Thread ID:
00993615
Message ID:
00993615
Views:
90
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
Reply
Map
View

Click here to load this message in the networking platform