declare AdoDB.Connection

Mohan

Member
Joined
Oct 18, 2006
Messages
17
Location
bangalore
Programming Experience
1-3
please help me coz i'm new to VB.NET

can anybody help me...
IN vb6
i used to declare "AdoDB.Connection" in Module and i with this connection i used to open many recordset at diff forms..

in vb.net i'm trying to do same thing but i'm not able to do it...

and please tel me is it required to write

Imports system.data
Imports System.sqlclient....all the dataaccess related namespaces in al the forms whrever i use dataaccess classes...

please tel me so that i want to declare connection class once and use in multiple forms...

thanks lot..

mohan
 
Wo there Mohan, don't go posting in old threads, if you've got a question start a new thread in the most appropriate place, welcome to the forums by the way. I've noticed that you have started posting in quite a few different older posts, and in one it seems like you may have problem with posting threads?
 
Thread splitted. Question not related to the thread it was posted in.
 
The simple answer to this is that you shouldn't. ADO.NET is designed in such a way that there is absolutely no gain to be had by using a single connection object. You should declare and create a connection object wherever one is required. It's not a bad idea to have a single connection string stored in one place and to have all your connections use that, but having multiple connection objects is no issue and encouraged by Microsoft.
 
thanks...

can u please help me by giving any sample application where it uses oops concept for database application development with add, modify, delete and retrieving data from database, everything should be in OOPs. so i can follow and learn fast. ur help is highly appreciated.
 
VB.NET is an OO language. It's impossible to write VB.NET code that isn't OO.

There are zillions of samples and tutorials on the Web. If you want ADO.NET tutorials then just search for "ado.net tutorial".

http://www.google.com.au/search?hs=...et"+tutorial+"visual+basic"&btnG=Search&meta=

There are also tutorial links in my signature. Also, fellow member TexhGnome has written a tutorial and has links in his signature.

If you want sample code then I'd suggest the 101 Samples from Microsoft as a start.

http://msdn.microsoft.com/vstudio/downloads/101samples/default.aspx
 
Back
Top