Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / February 2008



Tip: Looking for answers? Try searching our database.

VB 2008 Professional and SQL Express Questions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
peter.taslimi@hotmail.com - 17 Feb 2008 22:44 GMT
I am a beginner and having difficulty understanding some database connection
related issues. I started off with VB Express 2005/2008 and have moved to VB
2008 Professional (The trial edition currently).

1. In VB Express when connecting to a database I was given a choice as to
whether I wanted a copy in my local project directory. It seems that in VB
2008 one is not given a dialog to choose and instead one has to select
whether connecting to a database or attaching a database. Is this correct?

2. If 1) above is true, then there are two choices. Connect directly to the
database or attach to the database which creates a local connection under
the project directory.

3. If one connects directly to the database and enters sample data, then the
id counter can only be reset with an sql query statement or by deleting the
id field and re-entering it. I am not sure whether the dataset gets updated
at this point? or whether one has to delete the dataset and create it again
using the wizard?

4. If one attaches to the local project directory database and any changes
are required to the column structures, then this is the process I have gone
through :
   Fix the field in SSME.
   Detach the database, so that it can be copied to the project directory.
(Otherwise one is allowed to copy).
   Copy the database to the project directory.
   Recreate the dataset
   build the project again
   Run debug to see if it works.

I am sure there must be an easier way to deal with this and probably because
I just don't get the whole concept. Any explanations or related links would
be much appreciated..

Peter
Ralph - 18 Feb 2008 01:45 GMT
> I am a beginner and having difficulty understanding some database connection
> related issues. I started off with VB Express 2005/2008 and have moved to VB
[quoted text clipped - 31 lines]
>
> Peter

You need to post to a "dotNet" newsgroup. Try one of the following...

  microsoft.public.dotnet.languages.vb
  microsoft.public.dotnet.languages.vb.data
  microsoft.public.dotnet.framework.adonet
  microsoft.public.vstudio.general
  microsoft.public.vstudio.setup
William Vaughn - 18 Feb 2008 02:13 GMT
I commiserate. There are a number of places in Visual Studio that make it hard to understand how to connect to SQL Server. To address these issues, I wrote a long chapter in my book that focuses on connecting. I also give a long session on connecting in my workshops (the next is at DevWeek in Toronto). I would give you a two-paragraph answer here but the issue is more complex than that. Generally:

 a.. I don't endorse including the database in the project or using the User Instance=True option.
 b.. I do endorse setting up a local instance of SQL Express (this is done for you when you install VS) and attaching the database to that instance while building the database and the application(s) that access it.
 c.. I endorse building a setup script that deploys SQL Express and attaches the database at install time along with proper user configuration.
hth

Signature

__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205  (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________

>I am a beginner and having difficulty understanding some database connection
> related issues. I started off with VB Express 2005/2008 and have moved to VB
[quoted text clipped - 31 lines]
>
> Peter
peter.taslimi@hotmail.com - 26 Feb 2008 04:46 GMT
Thanks Bill for the response. Does your book provide examples of building setup scripts?

Peter

 I commiserate. There are a number of places in Visual Studio that make it hard to understand how to connect to SQL Server. To address these issues, I wrote a long chapter in my book that focuses on connecting. I also give a long session on connecting in my workshops (the next is at DevWeek in Toronto). I would give you a two-paragraph answer here but the issue is more complex than that. Generally:

   a.. I don't endorse including the database in the project or using the User Instance=True option.
   b.. I do endorse setting up a local instance of SQL Express (this is done for you when you install VS) and attaching the database to that instance while building the database and the application(s) that access it.
   c.. I endorse building a setup script that deploys SQL Express and attaches the database at install time along with proper user configuration.
 hth

 --
 __________________________________________________________________________
 William R. Vaughn
 President and Founder Beta V Corporation
 Author, Mentor, Dad, Grandpa
 Microsoft MVP
 (425) 556-9205  (Pacific time)
 Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
 ____________________________________________________________________________________________
 <peter.taslimi@hotmail.com> wrote in message news:4067A104-8606-4E63-AAC6-D89B6896851E@microsoft.com...
 >I am a beginner and having difficulty understanding some database connection
 > related issues. I started off with VB Express 2005/2008 and have moved to VB
 > 2008 Professional (The trial edition currently).
 >
 > 1. In VB Express when connecting to a database I was given a choice as to
 > whether I wanted a copy in my local project directory. It seems that in VB
 > 2008 one is not given a dialog to choose and instead one has to select
 > whether connecting to a database or attaching a database. Is this correct?
 >
 > 2. If 1) above is true, then there are two choices. Connect directly to the
 > database or attach to the database which creates a local connection under
 > the project directory.
 >
 > 3. If one connects directly to the database and enters sample data, then the
 > id counter can only be reset with an sql query statement or by deleting the
 > id field and re-entering it. I am not sure whether the dataset gets updated
 > at this point? or whether one has to delete the dataset and create it again
 > using the wizard?
 >
 > 4. If one attaches to the local project directory database and any changes
 > are required to the column structures, then this is the process I have gone
 > through :
 >    Fix the field in SSME.
 >    Detach the database, so that it can be copied to the project directory.
 > (Otherwise one is allowed to copy).
 >    Copy the database to the project directory.
 >    Recreate the dataset
 >    build the project again
 >    Run debug to see if it works.
 >
 > I am sure there must be an easier way to deal with this and probably because
 > I just don't get the whole concept. Any explanations or related links would
 > be much appreciated..
 >
 > Peter
 >
 >
William Vaughn - 26 Feb 2008 17:45 GMT
Nope, sorry. They told me to stop writing as I approached 800 pages... ;)

Signature

__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205  (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________

 Thanks Bill for the response. Does your book provide examples of building setup scripts?

 Peter

   "William Vaughn" <billvaNoSPAM@betav.com> wrote in message news:A193A0A9-32BF-44C7-B13D-0CEC018BF0DC@microsoft.com...
   I commiserate. There are a number of places in Visual Studio that make it hard to understand how to connect to SQL Server. To address these issues, I wrote a long chapter in my book that focuses on connecting. I also give a long session on connecting in my workshops (the next is at DevWeek in Toronto). I would give you a two-paragraph answer here but the issue is more complex than that. Generally:

     a.. I don't endorse including the database in the project or using the User Instance=True option.
     b.. I do endorse setting up a local instance of SQL Express (this is done for you when you install VS) and attaching the database to that instance while building the database and the application(s) that access it.
     c.. I endorse building a setup script that deploys SQL Express and attaches the database at install time along with proper user configuration.
   hth

   --
   __________________________________________________________________________
   William R. Vaughn
   President and Founder Beta V Corporation
   Author, Mentor, Dad, Grandpa
   Microsoft MVP
   (425) 556-9205  (Pacific time)
   Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
   ____________________________________________________________________________________________
   <peter.taslimi@hotmail.com> wrote in message news:4067A104-8606-4E63-AAC6-D89B6896851E@microsoft.com...
   >I am a beginner and having difficulty understanding some database connection
   > related issues. I started off with VB Express 2005/2008 and have moved to VB
   > 2008 Professional (The trial edition currently).
   >
   > 1. In VB Express when connecting to a database I was given a choice as to
   > whether I wanted a copy in my local project directory. It seems that in VB
   > 2008 one is not given a dialog to choose and instead one has to select
   > whether connecting to a database or attaching a database. Is this correct?
   >
   > 2. If 1) above is true, then there are two choices. Connect directly to the
   > database or attach to the database which creates a local connection under
   > the project directory.
   >
   > 3. If one connects directly to the database and enters sample data, then the
   > id counter can only be reset with an sql query statement or by deleting the
   > id field and re-entering it. I am not sure whether the dataset gets updated
   > at this point? or whether one has to delete the dataset and create it again
   > using the wizard?
   >
   > 4. If one attaches to the local project directory database and any changes
   > are required to the column structures, then this is the process I have gone
   > through :
   >    Fix the field in SSME.
   >    Detach the database, so that it can be copied to the project directory.
   > (Otherwise one is allowed to copy).
   >    Copy the database to the project directory.
   >    Recreate the dataset
   >    build the project again
   >    Run debug to see if it works.
   >
   > I am sure there must be an easier way to deal with this and probably because
   > I just don't get the whole concept. Any explanations or related links would
   > be much appreciated..
   >
   > Peter
   >
   >
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.