Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure error 1

Status
Not open for further replies.

EchoAlertcom

IS-IT--Management
Oct 8, 2002
239
0
0
US
I am getting this error when I run this page. The code is pasted below. I appreciate any help.

Also, can I open the connection and run as many executions as I want or do I have to open and close for each execution?

This is the error:

Code:
Microsoft OLE DB Provider for SQL Server error '80040e14' 
Line 1: Incorrect syntax near '.'. 
/sptest.asp, line 16

This is the page:

Code:
<html><head><title>SP Test</title></head>

<body>
<%

conBounceProc = &quot;Provider=SQLOLEDB;Server=0.0.0.0;Database=dbname;UID=uname;PWD=pword&quot;

dim varEAddr

varEAddr = &quot;me@myemail.com&quot;

set connection = server.createobject(&quot;adodb.connection&quot;)

connection.open conBounceProc 'dsnBounceHandling 

connection.Execute &quot;up_Update_SBounce &quot; & varEAddr


%>

</body>
</html>

Sincerely,
Steve
 


I think you need to look at the connection string - I believe using OLEDB means you have to specify database location in the string
 
Thank you for your response.

This connection string works in a similar script without an issue. But if you can point out where and how I could improve my connection string I would appreciate the help.

Code:
conBounceProc = &quot;Provider=SQLOLEDB;Server=0.0.0.0;Database=dbname;UID=uname;PWD=pword&quot;

Obviously the specific information in the string has been changed.

Thank you,
Steve
 
let me also add that I called the stored procedure from Query Analyzer with out any issues.
 
I have narrowed it down to the . in the email address.

When I test it withOUT the . in the email address I don't get the error.

Does anyone have a suggestion for dealing with this?

I am trying to update a record in the database based off of the email address so I need to use the .

Thank you for the help.

Steve
 
change:
connection.Execute &quot;up_Update_SBounce &quot; & varEAddr

to:
connection.Execute &quot;up_Update_SBounce '&quot; & varEAddr & &quot;'&quot;

Add the single quotes so your procedure types it as a string.


MrGreed

&quot;did you just say Minkey?, yes that's what I said.&quot;
 
Thank you. That worked great.

Sincerely,.
Steve
 
to answer your second question, yes, you can run as many commands against a single connection as you want without having to open and close it each time. (beware however if working with transactions that an unchecked error in one statement might roll them all back.)

regards!
-f!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top