VB.Net and Database Connection

N

Nick N.

Hi all,

I just started to play around with VB.Net.

I currenlty do Powerbuilder work and was wondering how database connection
management works in VB.net.

My applications typically pop-up a login window, attempts to connect to the
database (Sybase or MSSQL). Once the connection is established, it will open
a MDI Frame and the application will do whatever it is meant to do. (Mostly
reporting by SQL Query...in PB there is something called the Datawindow)

In Powerbuilder, there is a "global" variable called SQLCA which holds the
connection to the database and is accessible from any point in the
application given its global nature.

For instance, to connect to the database, I will set properties for the
SQLCA object then issue the following command:

connect using SQLCA;

then wherever I am in the application, I can reference the SQLCA object for
a valid database connection.

How is something like this done in VB.Net.
I managed to create a login window. I have the connection logic in the
clicked event of the OK button and it does connect to MS SQLServer 2K. Do I
have to then Pass the connection object to the MDI frame and other child
windows etc?

Or is there a cleaner way to do this?
I don't know if declaring a global oledbconnection object is the correct
thing to do.

Please advise!
Thanks
Nick
 
N

Nick N.

take it easy...
I didn't see my first post in outlook express...and i still don't see it.
 
B

Bob

I get that a lot, too (OE6), and sometimes I don't see my own post even after
restarting outlook. You may need to unsubscribe to the newsgroup, close outlook,
open it up again, then resubscribe.

Bob

Nick N. said:
take it easy...
I didn't see my first post in outlook express...and i still don't see it.
 
H

Herfried K. Wagner [MVP]

* "Nick N. said:
take it easy...
I didn't see my first post in outlook express...and i still don't see it.

No problem... I posted the message only to make sure people reply to
the other "instance" of the post.

;-)
 
C

CJ Taylor

Go to a different newsgroup, let it load new headers, and come back. that
works fo rme.


Bob said:
I get that a lot, too (OE6), and sometimes I don't see my own post even after
restarting outlook. You may need to unsubscribe to the newsgroup, close outlook,
open it up again, then resubscribe.

Bob
 
T

Tom Leylan

Bob said:
I get that a lot, too (OE6), and sometimes I don't see my own post even after
restarting outlook. You may need to unsubscribe to the newsgroup, close outlook,
open it up again, then resubscribe.

Uhhh Bob... you don't have to actually unsubscribe. If refreshing doesn't
work (sometimes telling it to "Catch Up" will cause your posting to be
skipped) then try Properties/Local File and select "Reset" it will download
all messages (for that newsgroup) from the server again.

Tom
 
B

Bob

Yeah, sometimes that doesn't work at all. I'd get into some other quirks, but
this isn't the Outlook NG...
 
B

Bob

Thanks for the tip, it will save me a few clicks. :)

Tho I'll still lose everything I marked.

Anyone up for writing a simple newsreader? Probably some source already out
there...

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top