
sending parameters from VB 6 to SQL 6.5 stored procedure
I'm trying to send parameters from a VB 6 code to a SQL server 6.5
stored procedure.
sp simply retrieves a list of rows.
here it is:
Begin
')')
end
return
Now, this works fine when I call the procedure in SQL Query Tool as:
exec Vendors_Fetch "2653,3733"
In VB side, I created a dataenvironment and dragged the sp into it.
Code that's supposed to retrieve some rows is this:
temp = "2653,3733"
de1.Vendors_Fetch (temp)
I always get only the first row but not the other(s) i.e. row with key
value = 2653
In other words (de1.rsVendors_Fetch.recordcount) is equal to 1.
In other case where variable (Vendor_ID) is a character but not an
integer, I call the procedure in SQL Query Tool as:
exec Vendors_Fetch "'2653','3733'"
and this works fine.
Back to VB application:
temp = "'2653','3733'"
de1.Vendors_Fetch (temp)
this time no rows retrieved not even the first row.
Anyone has any idea what's going on here???
Thanks,
Murat