473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 :)
Oct 14 '08 #1
1 3558
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...22(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/libr...4k(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.comschreef in bericht
news:%2****************@TK2MSFTNGP05.phx.gbl...
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 :)

Oct 15 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: elcc1958 | last post by:
I need to support a VB6 application that will be receiving disconnected ADODB.Recordset from out DotNet solution. Our dotnet solution deals with System.Data.DataTable. I need to populate a...
3
by: Marty | last post by:
Hi, What is the VB.NET equivalent of the VB6 ADODB.Connector and ADODB.Recordset? Thanks Marty
3
by: ching | last post by:
Hi I've seen many posting in the web on the similar problem I encountered below, but I still couldn't find any solution to it. I built an ASP.NET application, which is migrated from ASP. the...
0
by: Allan Ebdrup | last post by:
Using a completely cleat dotNet application project in VS, I have a COM component that I want to add a reference to, when I add the reference I get the error: --- A reference to...
4
by: Merlin | last post by:
Hi, In VB6 when using ADO e.t.c, it was often required to called the function db.engine.idle, otherwise MS Access took ages to release record locks and basically made concurrent use impossible....
3
by: Robert Batt | last post by:
Hello, I am having a problem with ADODB connection class. This was all working fine until I restarted the pc with last known good configuration, which seems to have screwed things up In the code...
3
by: Joe Befumo | last post by:
I'm getting the following error in my application: Compiler Error Message: BC30002: Type 'ADODB.Connection' is not defined. Source Error: Line 112: if(Request.Form("HdnQuestionCount") =...
3
by: Yuk Tang | last post by:
I'm trying to grab the fieldnames and values from a recordset, but I'm getting errors. I have an idea what the error might come from, but I'm not sure how to correct it. I'm connecting to an...
3
by: NT4U | last post by:
Hi, I am migrating an application from dotnet 1.1 to dotnet 2.0. When i use the solution file created in dotnet 1.1, on building the solution in dotnet 2.0 i am getting the following two errors...
7
by: Bryan | last post by:
Hi , I am using ADO (ADODB) with access database. Not sure what I am doing wrong.here. Can anyone please help me? string mdbFile = System.IO.Directory.GetCurrentDirectory() +" \\bTrack.mdb;"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.