dbTalk Databases Forums  

Help-VB.NET and SQL Server 2005

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Help-VB.NET and SQL Server 2005 in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sheenitmathew@gmail.com
 
Posts: n/a

Default Help-VB.NET and SQL Server 2005 - 01-23-2008 , 04:30 AM






Hai all,

I developed an application software using VB 6.0 at front end and MS
Access 2000 at the

back end. The application runs very slow as the size of the database
increses. I used

ODBC to link the front and back ends, and copied the data base file to
the user's

machine.

Now I plan to re-write the application using VB.NET and SQL Server
2005. Here comes my

problem. My application is a stand alone one. There is no server or
client machines. It

runs on a single computer system. When I develop it I use the
connection string

something like: "Data Source=COM3\SQLEXPRESS;Initial
Catalog=ImgDB;Integrated

Security=True". Even if I use OLEDB or ODBC, I am asked to connect to
the SQL Server. In

my machine I have installed it, so it runs without any problem.

My doubt is this: When I make exe files of my application and install
it on another

machine, that do not have SQL Server, the connection string will be
wrong. Besides, even

if my user's system has SQL Server the computer's name may be
different. So the Data

Source=COM3\SQLEXPRESS part will make an error. It is not possible to
edit the

connection string in an exe file. And I would like to know how can I
port my specific

database to the user's system.

I am a new face in VB.NET and SQL Server 2005. Please help me to solve
this problem.

Thanks in advance for your valuable replies.

Reply With Quote
  #2  
Old   
Dan Guzman
 
Posts: n/a

Default Re: Help-VB.NET and SQL Server 2005 - 01-23-2008 , 07:12 AM






First, I suggest you use SqlClient rather than OleDb ir ODBC for SQL Server
database access in .NET.

The Best Practice is to make database connection strings and other
environment-specific items configurable instead of hard-coding those in your
application. The .NET framework provides a number of options, such as
application settings, to facilitate storing and loading configuration data.
You can prompt for and set the proper values during installation and/or
provide a UI for the user to change the settings. See the Visual Studio
documentation for more information.

If your application reqiures SQL Server, you might consider providing the
option to install SQL Express in cases where the company does not have an
existing SQL Server. See
http://www.microsoft.com/sql/edition...tregister.mspx for
redistribution information.

--
Hope this helps.

Dan Guzman
SQL Server MVP

<sheenitmathew (AT) gmail (DOT) com> wrote

Quote:
Hai all,

I developed an application software using VB 6.0 at front end and MS
Access 2000 at the

back end. The application runs very slow as the size of the database
increses. I used

ODBC to link the front and back ends, and copied the data base file to
the user's

machine.

Now I plan to re-write the application using VB.NET and SQL Server
2005. Here comes my

problem. My application is a stand alone one. There is no server or
client machines. It

runs on a single computer system. When I develop it I use the
connection string

something like: "Data Source=COM3\SQLEXPRESS;Initial
Catalog=ImgDB;Integrated

Security=True". Even if I use OLEDB or ODBC, I am asked to connect to
the SQL Server. In

my machine I have installed it, so it runs without any problem.

My doubt is this: When I make exe files of my application and install
it on another

machine, that do not have SQL Server, the connection string will be
wrong. Besides, even

if my user's system has SQL Server the computer's name may be
different. So the Data

Source=COM3\SQLEXPRESS part will make an error. It is not possible to
edit the

connection string in an exe file. And I would like to know how can I
port my specific

database to the user's system.

I am a new face in VB.NET and SQL Server 2005. Please help me to solve
this problem.

Thanks in advance for your valuable replies.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.