Stored Procedure

Y

Yoshitha

Hi,
I've 2 stored procedures in Sql Server 2000 by name QA_User_Insert and
QA_Insert_Candidate.
Am using Oledb connection to connect to Sql server 2000. and i wrote
following code in ASP.Net

Dim MyConn As OleDbConnection = New OleDbConnection("uid=sa;Intial
Catelog=Quiz;data source=server;pwd=thanks;provider=SQLOLEDB.1")

Dim cmd As New OleDbCommand

cmd.Connection = MyConn

cmd.CommandType = CommandType.StoredProcedure

cmd.CommandText = "QA_User_Insert"

\\ Here i created paramentes and added to parameters collection of cmd
object. \\

cmd.ExecuteNonQuery()

then after running the application am getting Error

"Can Not Found Stored Procedure QA_User_Insert"

I 've checked sql server 2000 and i found that there is QA_User_Insert
stored Procedure.

why am getting this error ? plz can anybody tell me solution for this
problem.

Thanx in advance

Jyothi
 
G

Guest

The connection string is wrong. You've spelled Catalog incorrectly. This
doesn't raise an error when opening the connection, instead it defaults to
the master database and hence the command is unable to find the stored
procedure.

Fix up the connection string and you'll be right.

Perhaps the compiler should include a spell checker :).

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top