Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Excecutesql(INSERT INTO)

Author  Topic 

tony89
Starting Member

2 Posts

Posted - 2011-12-13 : 18:31:40
Hello,

I'm working in a MFC app in Visual C++ doing insertion into MS Access Database.
CDatabase db;
SqlString = "INSERT INTO ....";
db.ExecuteSQL( SqlString );


How can I organize my variable arguments into Sql String, so that it can be executed ?

SqlString = ("INSERT INTO Tabla1(date, reciver)VALUES(%s,%d)",i, getDate( ));

is not right, what could be the right way to having variable arguments ?

thank you

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-13 : 18:38:13
Duplicate.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -