I went to save an access db in the bin folder so I do not have to hard code
it like this:
string sConnString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source=E:\\\\Fr eddy\\Projects\ \vb.net\\Projec t Track It\\bin\\Projec t.mdb"; 3 2675
Hi Freddy,
I assume it is an ASP .NET app, where you can probably use Server.MapPath to
obtain the physical path of the virtual folder where your ASP .NET
application resides:
string sConnString =
string.Format(" Provider=Micros oft.Jet.OLEDB.4 .0;DataSource={ 0}\\bin\\Projec t.mdb",
Server.MapPath( "/MyWebApp");
--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"freddy" <fr****@discuss ions.microsoft. com> wrote in message
news:C7******** *************** ***********@mic rosoft.com... I went to save an access db in the bin folder so I do not have to hard code it like this: string sConnString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=E:\\\\Fr eddy\\Projects\ \vb.net\\Projec t Track It\\bin\\Projec t.mdb";
this is for a winform
"Dmytro Lapshyn [MVP]" wrote: Hi Freddy,
I assume it is an ASP .NET app, where you can probably use Server.MapPath to obtain the physical path of the virtual folder where your ASP .NET application resides:
string sConnString = string.Format(" Provider=Micros oft.Jet.OLEDB.4 .0;DataSource={ 0}\\bin\\Projec t.mdb", Server.MapPath( "/MyWebApp");
-- Sincerely, Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"freddy" <fr****@discuss ions.microsoft. com> wrote in message news:C7******** *************** ***********@mic rosoft.com...I went to save an access db in the bin folder so I do not have to hard code it like this: string sConnString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=E:\\\\Fr eddy\\Projects\ \vb.net\\Projec t Track It\\bin\\Projec t.mdb";
Then, use Application.Sta rtupPath instead of Server.MapPath.
--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"freddy" <fr****@discuss ions.microsoft. com> wrote in message
news:69******** *************** ***********@mic rosoft.com... this is for a winform
"Dmytro Lapshyn [MVP]" wrote:
Hi Freddy,
I assume it is an ASP .NET app, where you can probably use Server.MapPath to obtain the physical path of the virtual folder where your ASP .NET application resides:
string sConnString = string.Format(" Provider=Micros oft.Jet.OLEDB.4 .0;DataSource={ 0}\\bin\\Projec t.mdb", Server.MapPath( "/MyWebApp");
-- Sincerely, Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"freddy" <fr****@discuss ions.microsoft. com> wrote in message news:C7******** *************** ***********@mic rosoft.com... >I went to save an access db in the bin folder so I do not have to hard >code > it like this: > string sConnString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data > Source=E:\\\\Fr eddy\\Projects\ \vb.net\\Projec t Track > It\\bin\\Projec t.mdb";
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Monica Ferrero |
last post by:
Hi!
I'm not sure if this is the most adequate mySQL list for this post. If not,
please indicat me which one I should use...
I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the mysql-
connector-java-2.0.14-bin.jar in commons/lib.
The application runs normally, and usually about once or twice a day I get
this exception org.apache.commons.dbcp.DbcpException:
java.sql.SQLException: Server configuration denies access to data...
|
by: Greg Strong |
last post by:
Hello All,
I've written code in a test database with test data. Everything seems
to be working except compact database in VB code per
http://www.mvps.org/access/general/gen0041.htm. The reason I say this
is the auto number fields are NOT being reset to zero. I delete the
data from tables with action delete queries, then call the compact DB
code which is followed by importing data to tables and subsequent
append queries to other tables....
|
by: xarax |
last post by:
Greetings,
What is the general practice, usual and customary way,
of including a data file into a source file?
I have some large data structures defined as source
similar to:
=========================
typedef struct fubar
|
by: tshad |
last post by:
Is there a way to carry data that I have already read from the datagrid from
page to page?
I am looking at my Datagrid that I page through and when the user says get
the next page, I have to go to the database to get the next page. Is there
a way to use the dataset to allow us to read back and forth in it instead of
going back to the database to get it?
Thanks,
|
by: rogsonl |
last post by:
My computer was moved last week, and the company changed the network groups
we work on. As a result, one of the main benefits from Whidbey (database
connectivity) no longer works.
Situation:
1. I open a new project based on a windows form
2. I click on "data" and then "Add New Data Source" then I click on next
within the wizard
3. I have 3 choices Database, Local Database, Web service and Object.
4. I choose Database, click next and get...
| |
by: Rolf Welskes |
last post by:
Hello,
I have an ObjectDataSource which has as business-object a simple array of
strings. No problem.
I have an own (custom) control to which I give the DataSourceId and in the
custom-control so I get the ObjectDataSource. No problem
.....
ObjectDataSource src = .... //is ok i have it
|
by: John J. Hughes II |
last post by:
I have a DataGridView with a TextBoxColumn. I setting the data source to a
List<stringvalue in a static class. The list is filled from a background
thread. So far all is fine and it works great, at least on my system.
The reason I am doing this is some customers are pulling from VPN
connections which are slow. This allows the list of rows in the data grid
to appear a little quicker while the list which are not used as soon load in...
|
by: Anil Gupte |
last post by:
After reading a tutorial and fiddling, I finally got this to work. I can
now put two tables created with a DataTable class into a DataRelation.
Phew! And it works!
Dim tblSliceInfo As New DataTable("SliceInfo")
Dim tblSliceRatings As New DataTable("SliceRatings")
'.... All the adding datacolumns, datarows, etc. goes here..
DatasetInit.Tables.Add(tblSliceInfo)
|
by: BillE |
last post by:
I am using Visual Studio 2005 to create a web site which includes reports.
The web site has several sub-folders.
When working with reports I can't get the website data sources (classes and
datasets in App_Code folders throughout the project) to behave
consistently.
Sometimes data source are displayed, sometimes not. Sometimes I can add
new data sources, sometimes I can't. Some classes are displayed, some
aren't. I can't figure...
|
by: natalie99 |
last post by:
Hey people!
Being so lacking in access knowhow I have turned to good old 'asking the smart people' again!
I need to create a query or lookup table (although I have had zero success with lookups for this particular problem) that will do the following:
1. From the main data source (query result called qryUnmatchID) compare the ID field to the ID field in 8 other data sources
then
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |