
Passing parameters from Excel to SQL 6.5 stored procedures
Quote:
> >Hi,
> >I am trying to pass paramaters from an excel 97 spreadsheet into a
> >stored procedure in SQL Server 6.5.
> >I have tried some code samples from the MSDN but I have had no luck.
> >Part of the problem is that I do not have access to the ADO library.
> >Any suggestions, tips, references or samples would be very welcome.
> >Thanks in advance for your help.
> >Egie
> Is there any reason you can not download the ADO library? Thats the
> best way.
> Failing that
> EXEC spWhatEver para1, para2
Thanks for the tip Pete.
I have referenced Active X DAO 2.5 library and XLODBC.XLA in my
project so I can now use the ADODB functions.
The problem seems to be that my the stored procedure I am calling has
1200 characters. I used the following code but once I add any more
characters to the string, the procedure call does not get to SQL
Server
Sub RetrieveData()
Dim Chan As Variant
Dim insertContWork
Chan = SQLOpen("DSN=EDAS17")
2,
'',
= 'STRD',"
SQLExecQuery Chan, _
"InsertContWork " & insertContWork
SQLClose (Chan)
End Sub