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.
| Author |
Topic |
|
vishu.av
Starting Member
26 Posts |
Posted - 2007-04-27 : 11:33:19
|
| Hi All,I have a TABLE and a SP as below..CREATE TABLE NAMES ( NAMES VARCHAR(12))CREATE PROCEDURE SP_NUM @NAME VARCHAR(12)ASINSERT INTO NAMES VALUES(@NAME)HOW CAN I INSERT A NAME IN MY NAMES TABLE USING ODBC CALL..CAN I USE SOMETHING LIKE THIS SQLCHAR name[12] = "VFLOOR"; SQLINTEGER Num2 = 0;retcode = SQLPrepare((hStmt),(SQLCHAR*)"{CALL SP_NUM(?)}",SQL_NTS);retcode = SQLBindParameter(hStmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_VARCHAR,sizeof(name) , 0, name, 0, &Num2);retcode = SQLExecute (hStmt); Inspite of the fact that all is fine till last statement, the valuestring in 'name' is not inserted in Name table.Can anybody tell me what is wrong in this piece of code?Thanks in advance vishuBangalore |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|
|
|