Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does anyone know the way to use C++

Status
Not open for further replies.

drchrisco

Technical User
Joined
Dec 10, 2001
Messages
1
Location
US
Does anyone know the way to use C++ program call a SQL query based on user based information. I know how to C++ act like EM but couldn't figure out how to access the database in a program setting.

Thanks
Chrisco
 
Create an ADO connection in C++ to your SQL Server.
Set the connection parameters.

Use a string to contain the information. ie strSQL = "exec sp_Something " + var1 + "," + var2"

Then execute the information. ie adConn.Execute strSQL

I don't have the correct syntax infront of me, but I am pretty sure this is how it works.
Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top