freelanceprogrammers.org Forum Index » ASP

Sticky Wicket: C#.NET calling ADODB


Goto page Previous  1, 2
View user's profile Post To page top
peter_brunone Posted: Sat Jan 08, 2005 3:01 am


Joined: 11 Jan 2006

Posts: 38
Sticky Wicket: C#.NET calling ADODB
There is a connection string in the code when you click the View
Source link.

However, I think this example is better:

http://www.learnasp.com/freebook/learn/dbopen.aspx

Peter

-----Original Message-----
From: scaevola637 [mailto:scaevola637@...]

I am missing something. I do not see a connection string in any of
the code. I do not understnad how to get a connection string to the
com object. I will look at the example.
You are telling me I can use OLE DB and not have a connection string?


--- In AspNetAnyQuestionIsOk@yahoogroups.com, Dean Fiala
<dfiala@g...> wrote:
> Amen. No point to doing this -- if you are going to use .NET, use
> .NET, don`t saddle yourself having to call COM objects, just for
the
> sake of calling COM objects. You will waste hours/days/weeks
> attempting to meet this unnecessary technical requirement.
>
> The database doesn`t know/care what access technology you use, so
use
> the .NET data objects.
>
>
> On Fri, 7 Jan 2005 11:49:24 -0600, Peter Brunone <peterlists@b...>
wrote:
> >
> >
> > Doesn`t look possible to me, without a lot of misplaced
effort
> > anyway.
> >
> > I`m sure you`re right about what he said, but this guy
does NOT
> > need to be giving technical instructions in an environment that
he
> > doesn`t understand. He`s the manager, you`re the programmer.
Anyone
> > with a day of experience with .NET database operations would
tell you to
> > rewrite this function for OleDb (it would take about 15 minutes
if you
> > use the examples on LearnASP.com).
> >
> >
> > -----Original Message-----
> > From: scaevola637 [mailto:scaevola637@y...]
> >
> > HERE is one function that needs converting from vbscript to C#.
the
> > namespace is ADODB, which is guess is what everyone used in Classic
> > ASP before ASP.NET. I guess I need a book on Classic
ADO. The
> > instructions are to Keep using ADO but rewrite into C#.NET. I am
> > not sure it can be done.
> >
> > function OpenAFCPT()
> > set adoAFCPT = server.createobject("ADODB.Connection")
> > adoAFCPT.commandtimeout = dbCommandTimeOut
> > adoAFCPT.open dnsAFCPT, usrAFCPT, pasAFCPT
> > set cmdAFCPT = Server.CreateObject("ADODB.Command")
> > cmdAFCPT.ActiveConnection = adoAFCPT
> > cmdAFCPT.CommandTimeout = dbCommandTimeOut
> > cmdAFCPT.CommandType = adCmdStoredProc
> >
> > end function
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
>
> --
> Dean Fiala
> Very Practical Software, Inc
> http://www.vpsw.com






Yahoo! Groups Links
Reply with quote
Send private message
View user's profile Post To page top
charlesmarkc... Posted: Sat Jan 08, 2005 5:27 am


Joined: 07 Jan 2006

Posts: 63
Sticky Wicket: C#.NET calling ADODB
server=local
means the SQLserver is on the same box as IIS -- a very bad move
performance wise that is rcommended against in every Microsoft
document.

Provider=MSDASQL.1
is an artifact that allows ADO to connect to ODBC database drivers
using something called Kagara (an ODBC to OLEDB) bridge.

Basically you would never use that connection string as is in
ADO.net/ASP.net anyway. You would use the relevant new one.
ConnectionStrings.com will have a good equivalent.

On Fri, 07 Jan 2005 20:19:54 -0000, scaevola637 <scaevola637@...> wrote:
>
> On your site this line is:
> String constr = "server=(local)\NetSDK;Integrated
> Security=SSPI;database=Northwind;provider=sqloledb";
> do i put ""Provider=MSDASQL.1...
>
>
> --- In AspNetAnyQuestionIsOk@yahoogroups.com, Charles Carroll
> <911@l...> wrote:
> > The person is not making any sense. if what you mean is they want
> to
> > keep MS access in lace just use System.Data.OleDb instead of
> SQLClient
> > and talk to Access.
> >
> >
> http://www.learnasp.com/quickstart/howto/doc/adoplus/adorstodataset.a
> spx
> > shows how to convert a Recordset to a .net style entity
> >
> > But ADODB recordsets are for ASP code not ASP.net code
> >
> > Everything that can be done with Recordset is done cheaper and
> faster
> > with ExecuteReader or DataTables.
> >
> > On Fri, 07 Jan 2005 16:33:45 -0000, scaevola637 <scaevola637@y...>
>
> wrote:
> > >
> > > I am converting a web site from classic asp to asp.net
> > > The boss wants to keep the ADODB in place until the new sql
> database
> > > is ready. I want to know is it possible to do this?
> > > I never used adodb before. I only know data.sqlclient
> > >
> > > Let me know if it isp possible to rewrite all the adodb
> connections
> > > and calls from vbscript to C#. I tried this morning but could
> not
> > > get the Command.Execute to work
>
>
>
>
>
> ________________________________
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Reply with quote
Send private message
View user's profile Post To page top
System-Administrator@... Posted: Sun Jan 09, 2005 1:26 am


Joined: 03 Jan 2005

Posts: 15
Sticky Wicket: C#.NET calling ADODB
Peter Brunone"
> I`m sure you`re right about what he said, but this guy does NOT
> need to be giving technical instructions in an environment that he
> doesn`t understand.


I agree with that........................... It is the reason I just left my
last job. The Accountant was telling me what to do as a system
administrator! He didnt even know what a floppy was. Why do companies hirer
a IT specialiast and then have a mortgage banker tell them how to build a
PC? Seems money down the hole.....................


Have a nice day.
----- Original Message -----
From: "Peter Brunone" <peterlists@...>
To: <AspNetAnyQuestionIsOk@yahoogroups.com>
Sent: Friday, January 07, 2005 12:49 PM
Subject: RE: [AspNetAnyQuestionIsOk] Re: Sticky Wicket: C#.NET calling ADODB


>
>
> Doesn`t look possible to me, without a lot of misplaced effort
> anyway.
>
> I`m sure you`re right about what he said, but this guy does NOT
> need to be giving technical instructions in an environment that he
> doesn`t understand. He`s the manager, you`re the programmer. Anyone
> with a day of experience with .NET database operations would tell you to
> rewrite this function for OleDb (it would take about 15 minutes if you
> use the examples on LearnASP.com).
>
>
> -----Original Message-----
> From: scaevola637 [mailto:scaevola637@...]
>
> HERE is one function that needs converting from vbscript to C#. the
> namespace is ADODB, which is guess is what everyone used in
> Classic ASP before ASP.NET. I guess I need a book on Classic ADO. The
> instructions are to Keep using ADO but rewrite into C#.NET. I
> am not sure it can be done.
>
> function OpenAFCPT()
> set adoAFCPT = server.createobject("ADODB.Connection")
> adoAFCPT.commandtimeout = dbCommandTimeOut
> adoAFCPT.open dnsAFCPT, usrAFCPT, pasAFCPT
> set cmdAFCPT = Server.CreateObject("ADODB.Command")
> cmdAFCPT.ActiveConnection = adoAFCPT
> cmdAFCPT.CommandTimeout = dbCommandTimeOut
> cmdAFCPT.CommandType = adCmdStoredProc
>
> end function
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
Reply with quote
Send private message
View user's profile Post To page top
scaevola637 Posted: Fri Jan 14, 2005 3:20 am


Joined: 09 Jan 2006

Posts: 27
Sticky Wicket: C#.NET calling ADODB
Thanks Peter,
I told the Boss this today and he said he would make a database
available to use sqlclient against. I tried using
System.Reflection, I also thought about using tlbimp.exe to get
wrapper classes but I rapidly realized I was wasting my time.

> From: "Peter Brunone" <peterlists@b...>
> To: <AspNetAnyQuestionIsOk@yahoogroups.com>
> Sent: Friday, January 07, 2005 12:49 PM
> Subject: RE: [AspNetAnyQuestionIsOk] Re: Sticky Wicket: C#.NET
calling ADODB
>
>
> >
> >
> > Doesn`t look possible to me, without a lot of misplaced effort
> > anyway.
> >
> > I`m sure you`re right about what he said, but this guy does NOT
> > need to be giving technical instructions in an environment that
he
> > doesn`t understand. He`s the manager, you`re the programmer.
Anyone
> > with a day of experience with .NET database operations would
tell you to
> > rewrite this function for OleDb (it would take about 15 minutes
if you
> > use the examples on LearnASP.com).
> >
> >
> > -----Original Message-----
> > From: scaevola637 [mailto:scaevola637@y...]
> >
> > HERE is one function that needs converting from vbscript to C#.
the
> > namespace is ADODB, which is guess is what everyone used in
> > Classic ASP before ASP.NET. I guess I need a book on Classic
ADO. The
> > instructions are to Keep using ADO but rewrite into C#.NET. I
> > am not sure it can be done.
> >
> > function OpenAFCPT()
> > set adoAFCPT = server.createobject("ADODB.Connection")
> > adoAFCPT.commandtimeout = dbCommandTimeOut
> > adoAFCPT.open dnsAFCPT, usrAFCPT, pasAFCPT
> > set cmdAFCPT = Server.CreateObject("ADODB.Command")
> > cmdAFCPT.ActiveConnection = adoAFCPT
> > cmdAFCPT.CommandTimeout = dbCommandTimeOut
> > cmdAFCPT.CommandType = adCmdStoredProc
> >
> > end function
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
Reply with quote
Send private message
Goto page Previous  1, 2
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 2 of 2
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help