Re: Executing a StoredProcedure using ADOCommand object in ASP.NET 2.0



MJ (MJ@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
I'm trying to convert an ASP application into ASP.NET 2.0 (changing
the extension for files .asp to .aspx and then fixing all the issues).
While fixing one of the page I found that the old page calls a stored
procedure and gets the data and this was done using ServerSide Java
Script.
Now since this page has been changed to ASPX page 2.0 with the page
directive as <%@ Page Language="VB" %> I cannot use Server Side JavaScript
and VB Script on one page. So I decided to move the code to a class file.
The code looks something like this..
public static ADODB.Recordset GetDataAsADORecordSet_SP(string
strSPName,
string strProductID, string strConn)
{
OleDbDataAdapter custDA = new OleDbDataAdapter();
ADODB.Connection adoConn = new ADODB.Connection();

I don't know why you get the error you get, but if you are moving to
..Net, why not make the full move and move to SqlClient? Or if you need
to support multiple engines, at least OleDb Client withóut the ADODB
stuff? Old ADO is a bunch of crap in my opinion, and ADO .Net is so
much cleaner and nicer to work with.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Executing a StoredProcedure using ADOCommand object in ASP.NET
    ... .asp to .aspx and fix the issues that occurred because of the change. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.data.oledb)
  • Re: asp.net application hangs
    ... - It only does this if I resave an aspx file. ... then IIS will hang when I try to load in internet explorer. ... I thought somehow I corrupted the installation of Windows/IIS/.NET ... >> Explorer, SQL Server hangs too. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: An error has occurred while establishing a connection to the server
    ... Yup all d aspx pages have data acces. ... there is no problem with sql connection with pages out of this folder. ... SQL Server 2005, by default, the named pipes provider is not enabled. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Give a Call or open Aspx page through Stored Procedure
    ... I don't understand what exactly you want to do - what does the aspx page do? ... An aspx page is processed by IIS while sql server processes stored ... If you want a batch process in .net then you could create yourself a windows ...
    (microsoft.public.sqlserver.programming)
  • Re: Linked MSDE tables in Access
    ... that is, aspx pages. ... difficulty to have the ASP.NET app directly talk to SQL Server. ... > MSDE tables. ... It is rather odd settings. ...
    (microsoft.public.dotnet.framework.adonet)