Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Options for VB

Status
Not open for further replies.

at51178

Technical User
Joined
Mar 25, 2002
Messages
587
Location
US
Hey Guys
I am a newbie to Visual Basic I am just coming from VBA in Access so I know a little bit about the fundamentals object programming.
I have so far been able to link my form to a database and access data through SQLServer,Access, and Excel what my question is if I created a program in vb and I was using SQLServer in my project how would I be able to use the same information on the database if the person does not have SQLServer on their pc. Basically do I have to use a 3rd party database everytime I wasnt to access or enter data or does vb have it's own database that I could use to enter and access information.
 

1. Change the connection string
2. Do not use any provider specific methods, etc (unless they are avaiable amongst all the providers in question)

Best, is to create a Data provider class, for each provider which, will handle the db commands coming from the UI or Business classes the best way, according to the provider being used.
Or keep the actions simple enough to where you would only need to change the Connection string.
Stored proceedures may help with keeping provider specific functions seperate from the application code.
But, you may run into problems when functions used in one stored proceedure for a certain provider are not available in any form at all on another provider (no comparable function or combination of functions).
Here, you would need seperate methods in classes to pick up the lackings.

Seeing you come from VBA programming, when writing your hard coded SELECT statements, keep it basic and stay away from the VBA functions (Left(), Format, UCase, CInt, etc).
Use these in a stored proceedure/stored query.

MS Jet 4 uses enhanced support for ANSI 92 keywords.
These are the basic keywords, even though all are still not available with JET.

You might want to consider using MSDE for up to 5 concurrent users, and SQL Server for the rest.
MSDE is SQL Server with a connection governor, which will slow down drastically with > 5 conncurent users.
Then you're not changing alot of code/SP's.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top