Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DSN using trusted connection - SQLCONNECT
Message
De
21/11/2013 01:09:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01588242
Message ID:
01588439
Vues:
52
>>I need to establish a connection to SQL 2008 R2 in VFP from the command window .,..
>>
>>Could you refresh my memory on getting a connection in VFP to a system or file dsn from the command window?
>>
>>I have a system dsn ITF that uses a trusted connection (perhaps VFP is not seen as such?) (SQL Server Native Client 10.0)
>>
>>nConnectionHandle = SQLCONNECT('ITF') gets a -1
>>I created a file DSN and put in in my VFP path ITFDSN but nConnectionHandle = SQLCONNECT('ITFDSN') gets a -1 as well
>>
>>Am I doing something boneheaded or does this stuff not allow trusted connection or ...
>>
>>TIA
>
>What is the error?
>When you use any of SQL=* function you ALWAYS should check what the function returns and if it returns -1 check the error with AERROR function.

It was returning -1 but Hank taught me that ODBC DSN has to be explicitly created as 32 bit on a 64bit OS for VFP to be able to use it. Works fine now. I was confused because I had always done VFP before on a 32 bit box and never had a problem This time I was on Win7 64

(thanks for the reminder about the AERROR function. I forgot to look at that after I saw the -1)


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform