microsoft newsgroup web access
     dot net    |    ms sql    |    ms access    |    office    |    windows    |   
Microsoft ms sql group
sqlserver.ce
sqlserver.clients
sqlserver.clustering
sqlserver.connect
sqlserver.datawarehouse
sqlserver.dts
sqlserver.fulltext
sqlserver.msde
sqlserver.mseq
sqlserver.notificationsvcs
sqlserver.odbc
sqlserver.olap
sqlserver.programming
sqlserver.replication
sqlserver.reportingsvcs
sqlserver.security
sqlserver.server
sqlserver.setup
sqlserver.tools
sqlserver.xml
  
    

SQLNumResults() fails, when text parameter is binded as SQL_WLONGVARCHAR after calling SQLExecDirect



Hi,

I am trying to send large text to a stored procedure which takes parameter
as 'text' type as given below,
TestLargeText(largeText text, nValue1 int .. )

I am exeucting the above SP using ODBC apis as given below

- SQLBindParameter to bind the parameter with Data at execution time option
set
- Binding paramter as SQL_WLONGVARCHAR if text size is more than 4k
otherwise SQL_WVARCHAR
- Sending data at execution time in chunks..by calling SQLPutData in a loop.
- SQLExecDirect to execute the stored procedure
- SQLNumResults to check if stored procedure returns any result sets


In the above sequence, call to SQLNumResults() is passing if i bind to
SQL_WVARCHAR
but when text is more than 4k, and if i bind to SQL_WLONGVARCHAR the call to
SQLNumResults is failing and the error popped up is
[Microsoft][ODBC SQL Server Driver]Associated statement is not prepared

*** Is it allowed to call SQLNumResults after SQLExecDirect when we bind the
parameter with Data at Execution option. ???



with regards
Amaresh






Mon, 10 Jan 2005 17:52:23 +0530 "Vakul"


COPYRIGHT © 2004, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE
http://www.meetholland.com

advertisement:   complete list of microsoft newsgroup    |    uk based newsgroup    |