Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC Connectivity error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00768435
Message ID:
00768449
Vues:
19
Hi Sergey

>Can you post connection string? You can use SQLGETPROP(gnConnHandle,"ConnectString") to get it. Did you try with another table?

yes, yes and now yes

all three sqlexec and the sqltables return the same error
PUBLIC ARRAY aRet(1)
PUBLIC gnConnHandle
STORE SQLCONNECT('SageLine50v8', 'manager','') TO gnConnHandle
IF gnConnHandle <= 0
	= MESSAGEBOX('Unable to connect to Sage database', 16, 'SQL Connect Error')
*!*			return .f.
ELSE
	CLEAR
	?SQLGETPROP(gnConnHandle,"DataSource")
	?SQLGETPROP(gnConnHandle,"PacketSize")
	?SQLGETPROP(gnConnHandle,"ConnectBusy")
	?SQLGETPROP(gnConnHandle,"PacketSize")
	?SQLGETPROP(gnConnHandle,"DispLogin")
	?SQLGETPROP(gnConnHandle,"DispWarnings")
	?SQLGETPROP(gnConnHandle,"UserId")
	?SQLGETPROP(gnConnHandle,"WaitTime")
	?SQLGETPROP(gnConnHandle,"PacketSize")
	?SQLGETPROP(gnConnHandle,"PacketSize")
	?SQLGETPROP(gnConnHandle,"ConnectString")

ENDIF

sqlreply = SQLTABLES(gnConnHandle)
sqlreply = SQLEXEC(gnConnHandle, 'SELECT SALES_ORDER.* FROM  SALES_ORDER SALES_ORDER', 'csrBarcode')
sqlreply = SQLEXEC(gnConnHandle, 'SELECT * FROM SALES_ORDER', 'csrBarcode')
sqlreply = SQLEXEC(gnConnHandle, 'SELECT FIXED_ASSET.ASSET_REF, FIXED_ASSET.DETAILS_1 FROM FIXED_ASSET FIXED_ASSET', 'csrBarcode')
IF sqlreply=-1
	?AERROR(aRet)
	?aRet(1,2)
ELSE
	?sqlreply
ENDIF
SQLDISCONNECT(nHandle)
I am a bit lost. It works under MSQuery

Geoff


>
>>Hi
>>
>>I am trying to get an ODBC query to work but keep getting
>>
>>
Connectivity error: Unable to retrieve specific error information.  Driver is probably out of resources
>>
>>Can someone enlighten me as to what I should do to fix this?
>>
>>The query
>>
>>
sqlreply = SQLEXEC(gnConnHandle, 'SELECT SALES_ORDER.* FROM  SALES_ORDER SALES_ORDER', 'csrBarcode')
>>IF sqlreply=-1
>>	AERROR(aRet)
>>	?aRet(1,2)
>>ELSE
>>	?sqlreply
>>ENDIF
>>
>>worked once but I cannot figure out what I did to make it work.
>>
>>A bit lost
>>Geoff Scott
May all your weeds be wildflowers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform