Calling SQL Server Store Procedure 
Author Message
 Calling SQL Server Store Procedure

Hi,

I'm calling a SQL Server store procedure which takes datetime as one of the
input paramater.  So I took it as a string instead from the input and cast
it into datetime data type format, but VB is still complaining.

the code:

dateStr = "November 23, 2002"
dateStr1 = "October 01, 1999"
theDate = CDate(dateStr)
theDate1 = CDate(dateStr1)

set rs = db.Execute("dbo.mb_test_procedure theDate, theDate1, 66, 100")

When the execute command is executed it complaint saying:
   "Syntax error converting datetime from character string"

the Data Type of the inputs for the store procedure is nvarchar(20).  I have
changed it to varchar(20) and it still doesn't work.  Can someone help

Thanks
Henry



Sat, 08 Jan 2005 03:19:33 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Calling SQL Server Stored Procedures

2. Calling SQL Server stored procedure

3. Calling SQL Server Stored Procedures

4. Calling SQL Server Store Procedure

5. HELP - ASP Calling SQL Server Stored procedure

6. Borland Pascal 7.0 on 1.8Ghz plus computers.

7. HELP!! Need Code to Access Fax/Modem

8. Calling a SQL Server 2000 store procedure from MS-Access

9. HELP: Calling Stored Procedure w/large output from VB6 (using SQL Server)

10. HELP: Calling Stored Procedure w/large output from VB6 (using SQL Server)

11. Calling Crystal Report from VB, repo is based on Stored Procedure in Sql Server

12. HELP: Calling Stored Procedure w/large output from VB6 (using SQL Server)

 

 
Powered by phpBB® Forum Software