Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
ADODB on dotnet.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  18 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mr. X.  
View profile  
 More options Oct 13 2008, 8:00 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Mr. X." <no_spam_please@nospam_please.com>
Date: Mon, 13 Oct 2008 14:00:05 +0200
Local: Mon, Oct 13 2008 8:00 am
Subject: ADODB on dotnet.
Hello.

In earlier applications I did :
Dim conn As Adodb.connetion

... in order to declare a connection string (rest is known).

When I am using dotnet (In VISUAL STUDIO 2008),

The above isn't compiled.

On the aspx page :

...

<

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb"
Inherits="WebApplication1._Default" %>

in Default.aspx.vb :

==============

Partial Public Class _Default

Inherits System.Web.UI.Page

Dim conn As Adodb.connetion

Protected Sub LoginButton_Click(ByVal sender As Object, ByVal e As
EventArgs)

End Sub

End Class

"Dim conn As Adodb.connetion"  is not the correct syntax.

What is the correct syntax ?

Is there any other way to do connection to database (fits to sql-server
2008) ?

Thanks :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chuck  
View profile  
 More options Oct 13 2008, 8:42 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Chuck" <c...@c.com>
Date: Mon, 13 Oct 2008 08:42:42 -0400
Local: Mon, Oct 13 2008 8:42 am
Subject: Re: ADODB on dotnet.
For SQL you can look at the System.Data.SqlClient namespace

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconn...

You can also look at the factory classes, which will allow your app (with a
little careful consideration) to connect to different types of databases
depending on configuration.

http://www.developer.com/net/net/article.php/3504146

Chuck

"Mr. X." <no_spam_please@nospam_please.com> wrote in message

news:%23n8xZsSLJHA.2760@TK2MSFTNGP06.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Armin Zingler  
View profile  
 More options Oct 13 2008, 8:22 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Armin Zingler" <az.nos...@freenet.de>
Date: Mon, 13 Oct 2008 14:22:49 +0200
Local: Mon, Oct 13 2008 8:22 am
Subject: Re: ADODB on dotnet.
"Mr. X." <no_spam_please@nospam_please.com> schrieb

> "Dim conn As Adodb.connetion"  is not the correct syntax.

> What is the correct syntax ?

Did you set a reference to the library containing that class?

> Is there any other way to do connection to database (fits to sql-server
> 2008) ?

http://msdn.microsoft.com/en-us/library/ms254507.aspx

Armin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mr. X.  
View profile  
 More options Oct 13 2008, 9:02 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Mr. X." <no_spam_please@nospam_please.com>
Date: Mon, 13 Oct 2008 15:02:20 +0200
Local: Mon, Oct 13 2008 9:02 am
Subject: Re: ADODB on dotnet.
How can I set a reference to the library ?

Thanks :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kimiraikkonen  
View profile  
 More options Oct 13 2008, 9:13 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: kimiraikkonen <kimiraikkone...@gmail.com>
Date: Mon, 13 Oct 2008 06:13:36 -0700 (PDT)
Local: Mon, Oct 13 2008 9:13 am
Subject: Re: ADODB on dotnet.
On Oct 13, 4:02 pm, "Mr. X." <no_spam_please@nospam_please.com> wrote:

> How can I set a reference to the library ?

> Thanks :)

In Solution Explorer, right click on your project -> "Add Reference"
then choose necessary tab, in this case, from .NET tab, choose
System.Data.dll.

Hope this helps,

Onur Güzel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mr. X.  
View profile  
 More options Oct 13 2008, 9:11 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Mr. X." <no_spam_please@nospam_please.com>
Date: Mon, 13 Oct 2008 15:11:31 +0200
Local: Mon, Oct 13 2008 9:11 am
Subject: Re: ADODB on dotnet.
Found.

(Right click on project name + add reference + ADO)

It's a question for newbie user of Microsoft Visual Studio 2008.
(Still looking for good tutorial for M VS.2008).

Thanks anyway :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Armin Zingler  
View profile  
 More options Oct 13 2008, 9:14 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Armin Zingler" <az.nos...@freenet.de>
Date: Mon, 13 Oct 2008 15:14:59 +0200
Local: Mon, Oct 13 2008 9:14 am
Subject: Re: ADODB on dotnet.
"Mr. X." <no_spam_please@nospam_please.com> schrieb

> How can I set a reference to the library ?

> Thanks :)

http://msdn.microsoft.com/en-us/library/wkze6zky.aspx

Armin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Posseth [MCP]  
View profile  
 More options Oct 13 2008, 10:55 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Michel Posseth [MCP]" <M...@posseth.com>
Date: Mon, 13 Oct 2008 16:55:20 +0200
Local: Mon, Oct 13 2008 10:55 am
Subject: Re: ADODB on dotnet.
Mr X

It is clear to me  that you use classic ADODB syntax while in the .Net world
we use ADO.Net

Please read a bit about the subject ADO.Net as the next thing you are going
to miss is the recordset object
now in ADO.Net we have Datasets wich can exist out of one or more DataTables
a Datatables is the modern vaiant of of recordset object
a DataTable exists out of DataRows wich in its turn exists out of
DataColumns .

Also note the Disconnected aproach  of ADO.Net ,,, VS the choices you had to
choose at ADODB,,,  a datareader ( the thingy that fills the dataset in
ADO.Net )
is simular to a firehose cursor in classic ADO etc etc etc etc etc etc .

I would recomend you to read a good ADO.Net Book

http://astore.amazon.com/vbdotnetcoder-20?%5Fencoding=UTF8&node=9

Michel Posseth [MCP]
http://www.vbdotnetcoder.com

"Mr. X." <no_spam_please@nospam_please.com> schreef in bericht
news:%23n8xZsSLJHA.2760@TK2MSFTNGP06.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cor Ligthert[MVP]  
View profile  
 More options Oct 14 2008, 6:58 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Cor Ligthert[MVP]" <notmyfirstn...@planet.nl>
Date: Tue, 14 Oct 2008 12:58:24 +0200
Local: Tues, Oct 14 2008 6:58 am
Subject: Re: ADODB on dotnet.
Hi,

Dim myConnection As New ADODB.Connection
MyConnection.ConnectionString = "Provider='sqloledb';Data
Source='MySqlServer';" & _
        "Initial Catalog='Pubs';Integrated Security='SSPI';"

Cor

"Mr. X." <no_spam_please@nospam_please.com> schreef in bericht
news:%23n8xZsSLJHA.2760@TK2MSFTNGP06.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Posseth [MCP]  
View profile  
 More options Oct 14 2008, 1:29 pm
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Michel Posseth [MCP]" <M...@posseth.com>
Date: Tue, 14 Oct 2008 19:29:32 +0200
Local: Tues, Oct 14 2008 1:29 pm
Subject: Re: ADODB on dotnet.
Mr. X.

What i am still curious about is the following

I see all these people here giving you answers how to use "Classic" ADODB in
.Net 2008   ( wich i would sure not recomend you to do unless you have a
verry good reasson to do so

Are you aware of the fact that ADO.Net should be prefered in .Net ?

regards

Michel

"Mr. X." <no_spam_please@nospam_please.com> schreef in bericht
news:%23n8xZsSLJHA.2760@TK2MSFTNGP06.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mr. X.  
View profile  
 More options Oct 14 2008, 6:46 pm
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Mr. X." <no_spam_please@nospam_please.com>
Date: Wed, 15 Oct 2008 00:46:18 +0200
Local: Tues, Oct 14 2008 6:46 pm
Subject: Re: ADODB on dotnet.
Hello.
If ADO.NET is better choice for modern programming,
so I shall use it.

There is also application-box - is it related to ADO.NET.

What classic thing to do is :
using adodb.connection, and open it with a connectionString.
set a recordset by some pure sql : ado.recordSet rs =
connection.ExecuteQuery( sql ...)
do some rs.getNext until rs.eof.
close rs and connection.

What may be difference between ADO.NET & ADO ?
What are the stages of ADO.NET ?

No need much answer,
because I just got confused from VS 2008, and need some practice on it.
Problem has been solved since I add reference to ADO.

Thanks :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cor Ligthert[MVP]  
View profile  
 More options Oct 15 2008, 1:39 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Cor Ligthert[MVP]" <Notmyfirstn...@planet.nl>
Date: Wed, 15 Oct 2008 07:39:04 +0200
Local: Wed, Oct 15 2008 1:39 am
Subject: Re: ADODB on dotnet.
Because probably noboby including me, wants to answer again on that dead
horse again

As it is a question about AdoDB then you don't by instance know if this is
related with Sharepoint, where was AFAIK a time written  by some people like
the about the dispose method.

"It is best practise to use ADODB". About the Dispose this is changed on the
official MSDN pages, I am not aware about the status with AdoDB.

Cor

"Michel Posseth [MCP]" <M...@posseth.com> wrote in message
news:ujuQbJiLJHA.2164@TK2MSFTNGP02.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Posseth [MCP]  
View profile  
 More options Oct 15 2008, 1:27 pm
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Michel Posseth [MCP]" <M...@posseth.com>
Date: Wed, 15 Oct 2008 19:27:23 +0200
Local: Wed, Oct 15 2008 1:27 pm
Subject: Re: ADODB on dotnet.
Huh ???

> Because probably noboby including me, wants to answer again on that dead
> horse again

And then you start giving wrong answers ? ,  and i was having the impression
that his question was misunderstood by the rest of the  thread answerers
that is why i gave this thread a new push with my question

> As it is a question about AdoDB then you don't by instance know if this is
> related with Sharepoint, where was AFAIK a time written  by some people
> like the about the dispose method.

> "It is best practise to use ADODB". About the Dispose this is changed on
> the official MSDN pages, I am not aware about the status with AdoDB.

Wel after rereading this several times , i am still not sure if i understand
you correct

but i give it a shot :

>As it is a question about AdoDB then you don't by instance know if this is
>related with Sharepoint,

I guess he should have posted his question then in one of the sharepoint
related groups or at least mention sharepoint or any other valid reasson for
using legacy ADODB in .Net

>"It is best practise to use ADODB". About the Dispose this is changed on
>the official MSDN pages, I am not aware about the status with AdoDB.

AFAIK :  the prefered way in .Net languages  to access data and data
services is ADO.Net  and not ADODB
it as simple as ADO.Net = .Net    and ADODB = legacy  So if you program in
.Net wich one should be prefered ?

And Dispose why are you still talking about the Dispose thread ?
The book i quoted out was published in 2002 about the same time when VB.Net
was released to the public , so from my perspective the Dispose rule is as
old as .Net is out there .

Michel Posseth [MCP]
http://www.vbdotnetcoder.com

"Cor Ligthert[MVP]" <Notmyfirstn...@planet.nl> schreef in bericht
news:%23J1ZUhoLJHA.4600@TK2MSFTNGP06.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Posseth [MCP]  
View profile  
 More options Oct 15 2008, 1:59 pm
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Michel Posseth [MCP]" <M...@posseth.com>
Date: Wed, 15 Oct 2008 19:59:57 +0200
Local: Wed, Oct 15 2008 1:59 pm
Subject: Re: ADODB on dotnet.
Hello Mr. X

ADO.Net is the bether choice for all  .Net languages unless you have a valid
reasson to stick with ADO classic
i now for a fact that some programmers still use ADO classic just because
they use the ADOX  features in there programs
however the same  can be acomplished with ADO.Net and some DDL SQL .

here is a good ADO.Net reference

http://msdn.microsoft.com/nl-nl/data/aa937722(en-us).aspx

> What classic thing to do is :
> using adodb.connection, and open it with a connectionString.
> set a recordset by some pure sql : ado.recordSet rs =
> connection.ExecuteQuery( sql ...)
> do some rs.getNext until rs.eof.
> close rs and connection.

the ADO.Net equivalant would be something like this

Imports System.Data.SqlClient

Public Class Form1

Private Sub test()

Dim mySelectQuery As String = "SELECT OrderID, CustomerID FROM Orders"

'standard : Data Source=myServerAddress;Initial Catalog=myDataBase;User
Id=myUsername;Password=myPassword;

'Trusted : Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated
Security=SSPI;

Using myConnection As New SqlConnection("Data Source=myServerAddress;Initial
Catalog=myDataBase;Integrated Security=SSPI;")

Dim myReader As SqlDataReader

Using myCommand As New SqlCommand(mySelectQuery, myConnection)

myConnection.Open()

myReader = myCommand.ExecuteReader()

End Using

' Always call Read before accessing data.

While myReader.Read()

Debug.WriteLine((myReader.GetInt32(0) & ", " & myReader.GetString(1)))

End While

' always call Close when done reading.

myReader.Close()

' Close the connection when done with it.

myConnection.Close()

End Using

End Sub

End Class

> What may be difference between ADO.NET & ADO ?
> What are the stages of ADO.NET ?

http://msdn.microsoft.com/en-us/library/904fck4k(VS.80).aspx

http://en.wikipedia.org/wiki/ADO_vs_ADO.NET

I recomend you to read in on the subject it is not so hard , buy yourself
some good MS PRESS books

regards

Michel Posseth [MCP]
http://www.vbdotnetcoder.com

"Mr. X." <no_spam_please@nospam_please.com> schreef in bericht
news:%234YUK6kLJHA.5232@TK2MSFTNGP05.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cor Ligthert[MVP]  
View profile  
 More options Oct 16 2008, 1:38 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Cor Ligthert[MVP]" <Notmyfirstn...@planet.nl>
Date: Thu, 16 Oct 2008 07:38:00 +0200
Subject: Re: ADODB on dotnet.
Michel,

First: I agree that my previous message had a lot of grammatical failures. I
corrected it to quick, while in fact I had no time at that moment (like in
fact now).

Second: As advice,  buy a new book, books from 2002 where  based on Beta
2002 VB, while even the not Beta VB 2002 was very bad.
In that time is often used the sentence "It is best practise
.........................", simple because the mostly VB6 writers who were
converting there books did not understand things yet. This sentence exist as
well for AdoDB, however probably that is from before the .Net time and meant
that AdoDB was better than DOA. Those best practise sentences seem to have
mostly almost an endless life.

Thirth:  although I never use it, can AdoDB be a better choise to use for
application made solely for stand alone, by instance games, simply because
in those cases AdoDB is much quicker (DAO is even quicker but that is not
supported anymore).

Fourth: AdoDb has still to be supported for a while, because it is still in
Visual Studio .Net 2008,  because AdoDB is used by converting VB6 programs.

Cor

"Michel Posseth [MCP]" <M...@posseth.com> wrote in message
news:u1OpesuLJHA.4324@TK2MSFTNGP05.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Posseth [MCP]  
View profile  
 More options Oct 16 2008, 2:22 am
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Michel Posseth [MCP]" <M...@posseth.com>
Date: Thu, 16 Oct 2008 08:22:46 +0200
Local: Thurs, Oct 16 2008 2:22 am
Subject: Re: ADODB on dotnet.
Cor ,

> Second: As advice,  buy a new book, books from 2002 where  based on Beta
> 2002 VB, while even the not Beta VB 2002 was very bad.
> In that time is often used the sentence "It is best practise
> .........................", simple because the mostly VB6 writers who were
> converting there books did not understand things yet. This sentence exist
> as well for AdoDB, however probably that is from before the .Net time and
> meant that AdoDB was better than DOA. Those best practise sentences seem
> to have mostly almost an endless life.

no no no no , the book i am talking about is the core reference guide , it
is even updated today ( downloadable from the writers website )  with new
insights etc etc etc there is also a revisited 2005 version same story there
.

so you are now telling me that all official MS Press books are wrong , that
the MSDN library is wrong ,that our peers who agree are wriong ,  etc etc
etc you are kidding me are you ? , There is nothing beta or even
misinformation in the core reference guides you are talking about the
"Introducing " series of MS press wich this book is obviously not  MS Press
has  "Introducing" , "Step by Step", "Core Reference" , and "Advanced
Topics"

I only quote from  Core Reference and Advanced Topics versions of the MS
press Books they are not based on beta`s  and for a fact verry wel written i
can indeed not say the same for the "Introducing" and "Step by Step"Books
although they serve there purpose i comonly find flaws in them .

 For the rest of your dialogue , this is really beating death horses ,talk
facts,,,  simple question do you believe that it is completely normall to do
standard database stuff with ADODB in  a brand new VB.net 2008 application
??    i don`t  think so ,, so i guess we  are on the same line again .

Cause that is where this thread was all about , not that it can and could or
whatever,,,,,,  ofcourse this is a famous thing for Dutch people talking
everything straight that is bended as a curve ,,, telling a person that
black is actually white with some other color variations added to it

Not so verry long ago i was even atacked in this group by people who think
it is common practice to use DAO in brand new VB.Net apps so the long story
made short is ( i have to go to work now )  "Just because you can" ,
"doesn`t mean you should"  .

regards

Michel Posseth

"Cor Ligthert[MVP]" <Notmyfirstn...@planet.nl> schreef in bericht
news:eydCOG1LJHA.6000@TK2MSFTNGP04.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cor Ligthert[MVP]  
View profile  
 More options Oct 16 2008, 12:07 pm
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Cor Ligthert[MVP]" <Notmyfirstn...@planet.nl>
Date: Thu, 16 Oct 2008 18:07:50 +0200
Local: Thurs, Oct 16 2008 12:07 pm
Subject: Re: ADODB on dotnet.
Michel,

I stop this discussion, mostly we agree and I don't want to disturb that by
this kind childness discussions (for sure by me).

However, as advice don't write this,  "ofcourse this is a famous thing for
Dutch people talking everything straight that is bended as a curve "

Not everybody on Internet knows that you are as well Dutch so it can be seen
as discriminating (or whatever) Dutch people, beside that, I have more than
often showed in the newsgroups that my behaviour is oposite from that.

-:)

Cor


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Posseth [MCP]  
View profile  
 More options Oct 16 2008, 1:38 pm
Newsgroups: microsoft.public.dotnet.languages.vb
From: "Michel Posseth [MCP]" <M...@posseth.com>
Date: Thu, 16 Oct 2008 19:38:28 +0200
Local: Thurs, Oct 16 2008 1:38 pm
Subject: Re: ADODB on dotnet.
Cor ,

"We all come in different SHAPES and SIZES.
We all have STRENGTHS and weaknesses.

 What's right for one person may not be right for another.
 There are things that are important to me, that you don't care about at
all!
And sometimes your behavior doesn't make any sense to me.

But I want for us to understand each other, and communicate well,
because we live together in the same world.

I know I can't expect you to want the same things that I want.
We are not the same person, so we will not always see things the same way.

I have my own Thoughts and my own Ideas,
that may or may not fit into your vision of who I should be. "

Above is copied and pasted from a personalitypage but it reflects my
feelings regarding discussions like this
 i believe that  with a litle inmagination to reflect it on this group it
says it all .

Regards
Michel Posseth [MCP]
http://www.vbdotnetcoder.com

"Cor Ligthert[MVP]" <Notmyfirstn...@planet.nl> schreef in bericht
news:%23jR1Vl6LJHA.1736@TK2MSFTNGP03.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »