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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute stored procedure with parameter

Status
Not open for further replies.

jvande

MIS
Jun 6, 2001
115
US
I am trying to execute stroed procedure with a parameter. I have read a bunch of articles on it and found this to be a good way to do it, but I am having no luck. Can someone please tell me what is wrong. I have a feeling I am missing something dumb.

<%
Response.Buffer = true
Dim oConn, sSQL, oRS, dbConn
dbConn= &quot;Provider=SQLOLEDB;&quot; & _
&quot;Password=test;&quot; & _
&quot;User ID=web;&quot; & _
&quot;Initial Catalog=2002-Current;&quot; & _
&quot;Data Source=DBSERVER3;&quot;



Set oConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
oConn.Open(Application(&quot;dbConn&quot;))



sSQL = &quot;SP_Web_Summary_Query_By_EntityID''ch000000000''&quot; '

Set oRS = oConn.Execute(sSQL)

Do Until oRS.EOF

Response.Write(oRS.Fields(&quot;st.a01&quot;))

oRS.MoveNext

Loop


%>


Here is my error.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/secure/administrators/test.asp, line 15



 
Your page does not recognize the DSN DBSERVER3 as a regstered DSN. This means you need to set it up in the ODBC tool in Administrative tools or switch to using a system path instead of a DSN in your connection string.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top