Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 08-18-2004, 09:29 AM   #1 (permalink)
sllabres
Registered User
 
Join Date: Aug 2004
Posts: 3
sllabres is on a distinguished road
MSSQL and C++

Hi,
I noticed a previous thread on this topic but the solution provided, which was a link to a previous thread, was broken.
I am tryin got connect to a mssql database using C++, iv had a good trawl using google with no joy. Dont suppose anyone has some suggestions.

Thanks,

Sebastian

Last edited by sllabres; 08-19-2004 at 02:17 AM.
sllabres is offline   Reply With Quote
Old 08-19-2004, 04:23 AM   #2 (permalink)
sllabres
Registered User
 
Join Date: Aug 2004
Posts: 3
sllabres is on a distinguished road
SQLAPI++

Well iv come accross SQLAPI++ which looks like itll solve all my problems. Iv downloaded it and my app compiles ok except it seems to stop working. I cant seem to connect to the MSSQL database. My code is as follows:

SAConnection con;
SACommand cmd(
&con,
"Select * from nhssms");

con.setOption( "UseAPI" ) = "DB-Library";

try
{
con.Connect(
"SMSTEST@nhssms", // database name
"sa", // user name
"", // password
SA_SQLServer_Client);

con.Disconnect();
}
catch(SAException &x)
{
ShowErr((const char*)x.ErrText());
}

I must be doing something wrong, any suggestions?

Thanks,

Seb
sllabres is offline   Reply With Quote
Old 08-19-2004, 04:27 AM   #3 (permalink)
sllabres
Registered User
 
Join Date: Aug 2004
Posts: 3
sllabres is on a distinguished road
oh dear, sqlapi++ isnt free...heh can anyone suggest some free api's? or a way of accessing mssql.

cheers,

Seb
sllabres is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to connect to mssql using C++ ulrichshaman Platform/API C++ 5 09-14-2004 06:17 PM


All times are GMT -8. The time now is 01:48 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting