MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old September 6th, 2004, 02:55 AM
vengeance vengeance is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 23 vengeance User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!

Reply With Quote
  #2  
Old September 7th, 2004, 03:38 PM
mashRinx mashRinx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 79 mashRinx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
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!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Connecting MS SQL 2000 thru C++


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway