|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Connecting MS SQL 2000 thru C++
Hi,
1)can someone help to explain these 2 lines of codes to me? I need to change this 2 lines of code to my SQL 2000 database that is connected to my computer locally using Windows NT. How can i change these code?Thanks! char *connectionString = "dsn=SPS;uid=sa;pwd=;"; hr=pRs->Open(queryString,connectionString,adOpenStatic,adLockOptimistic,adCmdUnknown); From what i know this is connecting to an instance of the server using sa as login and no password. What does the dns refer to ? 2) If i wan to connect to a database located at the server installed on my computer locally using Windows NT authentication , do i use "strConnection = _T("Driver={SQL Server};Server=MyServerName;" "Trusted_Connection=no;" "Database=SPS;Uid=;Pwd=;");" If not so,how then?Please kindly advice! |
|
#2
|
|||
|
|||
|
There is a pretty good, recent post in the "C Programming" forum that may provide what you are looking for:
http://forums.devshed.com/t178028/s.html&highlight=SQL Hope this helps! |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Connecting MS SQL 2000 thru C++ |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|