By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,621 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

execute SP from ms access

P: n/a
I have this code in my button click event. this runs with no error.
However, the stored procedure doesnt execute from the sql server.

any idea?

TIA

Dim oCn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim myQry As QueryDef

Set oCn = New ADODB.Connection
Set myQry = New QueryDef

oCn.Open "Driver=SQL Server; Server=itp_sql_server;
Database=maindb; uid=sa; pwd="
myQry.SQL = "exec sp_Pledge '" & Form_DATERANGE.Text4.Value & "',
'" & Form_DATERANGE.Text7.Value & "'"
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Joriz wrote:
I have this code in my button click event. this runs with no error.
However, the stored procedure doesnt execute from the sql server.

any idea?

TIA

Dim oCn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim myQry As QueryDef

Set oCn = New ADODB.Connection
Set myQry = New QueryDef

oCn.Open "Driver=SQL Server; Server=itp_sql_server;
Database=maindb; uid=sa; pwd="
myQry.SQL = "exec sp_Pledge '" & Form_DATERANGE.Text4.Value & "',
'" & Form_DATERANGE.Text7.Value & "'"


You need to make sure that the dates are in a format SQL Server
understands, e.g. yyyy-mm-dd

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.