PC Review


Reply
Thread Tools Rate Thread

Common SQL connection help

 
 
=?Utf-8?B?ZnN1X21pa2U=?=
Guest
Posts: n/a
 
      26th Jan 2005
Can someone share with me code for the following task please?
1) User clicks a button(button1), to bring up a file location window for the
user to select the SQL Server 2000 and Pub database on the network(not
onhis/her current machine so the user needs to create the correct path).
2)That user selction will then create the SQL connection.
3) ListBox1 on Form1 will then show the authors in the Pubs database.

Thank you for any help with this, I think once I get past this point I will
break thru this wall I have hit for connecting to a SQL server that is not my
workstation.

Mike
 
Reply With Quote
 
 
 
 
Bernie Yaeger
Guest
Posts: n/a
 
      26th Jan 2005
Hi Mike,

The answer's really pretty simple: put the app on a shared network drive;
then structure the connectionstring calling the server by name (eg,
ASCCOSVR), etc.

I do this with all of the apps I build for clients on servers; the
workstations connect to the server without any difficulty.

HTH,

Bernie Yaeger

"fsu_mike" <(E-Mail Removed)> wrote in message
news:7B2DE70A-46F4-4FA9-89B9-(E-Mail Removed)...
> Can someone share with me code for the following task please?
> 1) User clicks a button(button1), to bring up a file location window for
> the
> user to select the SQL Server 2000 and Pub database on the network(not
> onhis/her current machine so the user needs to create the correct path).
> 2)That user selction will then create the SQL connection.
> 3) ListBox1 on Form1 will then show the authors in the Pubs database.
>
> Thank you for any help with this, I think once I get past this point I
> will
> break thru this wall I have hit for connecting to a SQL server that is not
> my
> workstation.
>
> Mike



 
Reply With Quote
 
W.G. Ryan eMVP
Guest
Posts: n/a
 
      26th Jan 2005
What do you mean about file location. Do you need to see all of the Sql
Servers running on the network - or do you need to point to the mdf file?

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"fsu_mike" <(E-Mail Removed)> wrote in message
news:7B2DE70A-46F4-4FA9-89B9-(E-Mail Removed)...
> Can someone share with me code for the following task please?
> 1) User clicks a button(button1), to bring up a file location window for

the
> user to select the SQL Server 2000 and Pub database on the network(not
> onhis/her current machine so the user needs to create the correct path).
> 2)That user selction will then create the SQL connection.
> 3) ListBox1 on Form1 will then show the authors in the Pubs database.
>
> Thank you for any help with this, I think once I get past this point I

will
> break thru this wall I have hit for connecting to a SQL server that is not

my
> workstation.
>
> Mike



 
Reply With Quote
 
=?Utf-8?B?ZnN1X21pa2U=?=
Guest
Posts: n/a
 
      27th Jan 2005
I want the user to be prompted with a directory window to select the server
on the network, I have more than one SQL server. With this example I am
using the Pubs database, and the authors table. So the user can run the
program once to select Server1, and the next time they can select Server2,
but then use the Pubs database no matter which server they select. The
listbox1 will display authors.

Thanks

"W.G. Ryan eMVP" wrote:

> What do you mean about file location. Do you need to see all of the Sql
> Servers running on the network - or do you need to point to the mdf file?
>
> --
> W.G. Ryan, MVP
>
> www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> "fsu_mike" <(E-Mail Removed)> wrote in message
> news:7B2DE70A-46F4-4FA9-89B9-(E-Mail Removed)...
> > Can someone share with me code for the following task please?
> > 1) User clicks a button(button1), to bring up a file location window for

> the
> > user to select the SQL Server 2000 and Pub database on the network(not
> > onhis/her current machine so the user needs to create the correct path).
> > 2)That user selction will then create the SQL connection.
> > 3) ListBox1 on Form1 will then show the authors in the Pubs database.
> >
> > Thank you for any help with this, I think once I get past this point I

> will
> > break thru this wall I have hit for connecting to a SQL server that is not

> my
> > workstation.
> >
> > Mike

>
>
>

 
Reply With Quote
 
W.G. Ryan eMVP
Guest
Posts: n/a
 
      27th Jan 2005
http://www.codeproject.com/cs/database/LocatingSql.asp
http://www.csharphelp.com/archives2/archive342.html

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"fsu_mike" <(E-Mail Removed)> wrote in message
news:C3D1942C-74B8-449E-A592-(E-Mail Removed)...
> I want the user to be prompted with a directory window to select the

server
> on the network, I have more than one SQL server. With this example I am
> using the Pubs database, and the authors table. So the user can run the
> program once to select Server1, and the next time they can select Server2,
> but then use the Pubs database no matter which server they select. The
> listbox1 will display authors.
>
> Thanks
>
> "W.G. Ryan eMVP" wrote:
>
> > What do you mean about file location. Do you need to see all of the

Sql
> > Servers running on the network - or do you need to point to the mdf

file?
> >
> > --
> > W.G. Ryan, MVP
> >
> > www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> > "fsu_mike" <(E-Mail Removed)> wrote in message
> > news:7B2DE70A-46F4-4FA9-89B9-(E-Mail Removed)...
> > > Can someone share with me code for the following task please?
> > > 1) User clicks a button(button1), to bring up a file location window

for
> > the
> > > user to select the SQL Server 2000 and Pub database on the network(not
> > > onhis/her current machine so the user needs to create the correct

path).
> > > 2)That user selction will then create the SQL connection.
> > > 3) ListBox1 on Form1 will then show the authors in the Pubs database.
> > >
> > > Thank you for any help with this, I think once I get past this point I

> > will
> > > break thru this wall I have hit for connecting to a SQL server that is

not
> > my
> > > workstation.
> > >
> > > Mike

> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?ZnN1X21pa2U=?=
Guest
Posts: n/a
 
      27th Jan 2005
Thanks, but I don't want to use ODBC, want to use the SQLconnection process.

"W.G. Ryan eMVP" wrote:

> http://www.codeproject.com/cs/database/LocatingSql.asp
> http://www.csharphelp.com/archives2/archive342.html
>
> --
> W.G. Ryan, MVP
>
> www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> "fsu_mike" <(E-Mail Removed)> wrote in message
> news:C3D1942C-74B8-449E-A592-(E-Mail Removed)...
> > I want the user to be prompted with a directory window to select the

> server
> > on the network, I have more than one SQL server. With this example I am
> > using the Pubs database, and the authors table. So the user can run the
> > program once to select Server1, and the next time they can select Server2,
> > but then use the Pubs database no matter which server they select. The
> > listbox1 will display authors.
> >
> > Thanks
> >
> > "W.G. Ryan eMVP" wrote:
> >
> > > What do you mean about file location. Do you need to see all of the

> Sql
> > > Servers running on the network - or do you need to point to the mdf

> file?
> > >
> > > --
> > > W.G. Ryan, MVP
> > >
> > > www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> > > "fsu_mike" <(E-Mail Removed)> wrote in message
> > > news:7B2DE70A-46F4-4FA9-89B9-(E-Mail Removed)...
> > > > Can someone share with me code for the following task please?
> > > > 1) User clicks a button(button1), to bring up a file location window

> for
> > > the
> > > > user to select the SQL Server 2000 and Pub database on the network(not
> > > > onhis/her current machine so the user needs to create the correct

> path).
> > > > 2)That user selction will then create the SQL connection.
> > > > 3) ListBox1 on Form1 will then show the authors in the Pubs database.
> > > >
> > > > Thank you for any help with this, I think once I get past this point I
> > > will
> > > > break thru this wall I have hit for connecting to a SQL server that is

> not
> > > my
> > > > workstation.
> > > >
> > > > Mike
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is firewire a common connection? Metspitzer DIY PC 4 10th Sep 2009 05:02 PM
I want to make common connection string for database Alex Smith Microsoft ASP .NET 3 22nd Jun 2005 02:22 PM
Common Connection Pool =?Utf-8?B?VG9t?= Microsoft Dot NET Framework 0 9th Mar 2004 04:21 AM
Common Connection Lora Connors Microsoft ADO .NET 2 5th Dec 2003 07:10 PM
Common connection for DALC's Marcel Cugini Microsoft ASP .NET 0 18th Nov 2003 03:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:46 PM.