.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 28th, 2003, 11:56 AM
raspsu1 raspsu1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 17 raspsu1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
oleDbConnection Data Source

For starters, I am using C# to develop a web form.

I am in the stages of connecting my web form to an Access database.

I can access the information just fine; I am just doing some house keeping now trying to get it ready for the web. I am building it on a local machine, but will run it from an outside server.

When I make the connection to the database using an oleDbConnection, the Data Source is in the long form C:\Inetpub\wwwroot\DB\Login. However, this string would not suffice for an actual web server because there is no C:\Inetpub\wwwroot. I can obviously always create a DB directory once I send the files over.

I want to know about how to make the Data Source a generic name (i.e. ..\DB\Login)?

I have tried using ..\DB\Login as the data source and that does not work. The connection is made (according to MS Visual Studio .NET, you can test the connection when first create it), but the oleDbConnection will not open (oleDBConnection.Open()) when I run my code. It will run fine if I leave it as C:\Inetpub\wwwroot\DB\Login, but fails if I use attempt to use ..\DB\Login

Any suggestion on how to make the Data Source and/or Connection generic or is there something I must change before sending it to the web?
Comments on this post
Gran Roguismo agrees!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > oleDbConnection Data Source


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT