ADO .NET - novice needs help

  • Thread starter Thread starter sean
  • Start date Start date
S

sean

Hi There,

I am trying to execute some stored querys in my access 2000 database, I
would like to do them in ADO .net but I am haing syntax troubles. This is
how I would normally do it in .asp, could someone post the equivilent of
this code in ADO.net please?

Sean


set objConn = server.createobject("adodb.connection")
objConn.open db_conn

Set objRec = Server.CreateObject("ADODB.Recordset")
Set oCMD = Server.CreateObject("ADODB.Command")
oCMD.ActiveConnection = objConn
oCMD.CommandType = adCmdStoredProc
oCMD.CommandText = "sp_UpdateCatagorie"
oCMD.Parameters.Append oCMD.CreateParameter("pCatid",adInteger)
oCMD.Parameters("pCatid") = intTheCatid
oCMD.Parameters.Append oCMD.CreateParameter("pCatDesc", adVarChar,
adParamInput,255)
oCMD.Parameters("pCatDesc") = strTheCatName
oCMD.Execute
 
See my article on Stored Procedures--it should answer your questions.
http://www.betav.com/msdn_magazine.htm


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top