Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SqlConnect(),SqlGetProp()
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00800681
Message ID:
00801068
Views:
14
Hello Ajay,

First i thought to email you. Then i thought it is good if write here. So that if something is wrong, others can also share their view.

Actually, there are a few properties of active connection which are returned from what you have passed (there can be a difference in what you have actually executed).

Like,
SQLGETPROP(nHandle,'UserID') and SQLGETPROP(nHandle,'Password') will return you the values which you have passed in SQLCONNECT([DataSourceName, cUserID, cPassword | cConnectionName]) respectively. So, if you does not pass cUserId/cPassword in SQLCONNECT, you will get nothing in SQLGETPROP(nHandle,'UserID') and SQLGETPROP(nHandle,'Password').

Or, if you passed the cUserId/cPassword, but changed it in the SQL ODBC dialog prompt, you will only get the UserId/Password which you have initially supplied.

Now the question is, why you are seeing the correct Userid/Password in ConnectString? The answer is, the ConnectString is generated by the ODBC itself before connecting through the DSN (unless you are not passing the cConnectionName in SQL Connect). Hence, you are always getting correct values in ConnectString.



---
Raj
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform