473,473 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

execute SP from ms access

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
1 1488
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jill Graham | last post by:
Hi, I'm using an access database and found following problem : I have a table X with 2 records : record 1 & record 2. I execute following procedure with 2 steps : 1. The procedure deletes...
5
by: ano1optimist | last post by:
I'm using Access 2000 and have tried Access 2003 front-end to execute the stored procedure sp_password on SQL Server 2000. I continue to receive the following message: "The old (current) password...
4
by: Noloader | last post by:
Hello, Access XP, SQL Server 2000 Is it possible to hide a SP under Queries in Access, yet still be able to Execute it from Access? We hooked up a custom form to accept the input parameters...
9
by: PyPK | last post by:
Hi if I have a function called tmp=0 def execute(): tmp = tmp+1 return tmp also I have def func1(): execute() ....
2
by: Norman Fritag | last post by:
Hi there The below code executes some queries. As newbie I was wondering weather you are better of using connection execute or command execute to execute queries? I am asking as...
8
by: RC | last post by:
In my Access 2002 form, I have a combo box and on the AfterUpdate event I use DoCmd.RunSQL ("UPDATE .... to update records in a table. When it starts to run I get a message "You are about to...
4
by: Robert | last post by:
What is the syntax to use in a VBA script to execute a pass-through? Thanx
3
by: Sophos | last post by:
Hi, I have a basic aspx page, in the Page_Init procedure I have a server.execute of another aspx page that adds some html code to my first page. However it also adds a control (an htmlimage),...
2
by: Christine.Misseri | last post by:
Hi all, I'm sure someone knows about this problem. I have an Access database designed in Access 2000, connected to an ORACLE 8i back end. On the ORACLE side I have stored procedures, triggers...
2
by: Shapper | last post by:
Hello, I have the tables content and content_localized in a Microsoft Access database. I created a Query in my Microsoft Access database named "content_SELECT": SELECT...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.