473,394 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

help in publishing a .net application that uses microsoft access

Hi, i am using vb.net 2005, and i am using microsoft access as my database

I have published the application using the built in publisher of vb.net and come up with the setup.exe,

after publishing i tested the setup.exe and tried installing it on my computer,
all went well, until i tried to run the installed application, there is an error that says "cannot find file...../db1.mdb"

it seems that when i publish the application, it does not include the database i am using "db1.mdb".

is there some way to include my database in publishing the application?

thank you for the replies...
Nov 2 '07 #1
3 3689
balabaster
797 Expert 512MB
Hi, i am using vb.net 2005, and i am using microsoft access as my database

I have published the application using the built in publisher of vb.net and come up with the setup.exe,

after publishing i tested the setup.exe and tried installing it on my computer,
all went well, until i tried to run the installed application, there is an error that says "cannot find file...../db1.mdb"

it seems that when i publish the application, it does not include the database i am using "db1.mdb".

is there some way to include my database in publishing the application?

thank you for the replies...
Did you actually include your database in your project or just reference it from the config file? If you add the database the database (right click your project in the project explorer and select "Add existing item..." and go find your database.
Nov 2 '07 #2
i tried doing it, and after i published it again, i saw the deploy file of my mdb
named db1.mdb.deploy, but after trying to install it again, the same problem occurs (cant find file ...../db1.mdb)

is it because i am using unbound connection,
i connect to the database by using this line of codes:

Dim con As String = "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source = db1.mdb"
Dim sql As String = "select * from users"
Dim da As New OleDb.OleDbDataAdapter(sql, con)
da.Fill(dt)


thanks for the help, i really appreciate it...
Nov 2 '07 #3
balabaster
797 Expert 512MB
i tried doing it, and after i published it again, i saw the deploy file of my mdb
named db1.mdb.deploy, but after trying to install it again, the same problem occurs (cant find file ...../db1.mdb)

is it because i am using unbound connection,
i connect to the database by using this line of codes:

Dim con As String = "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source = db1.mdb"
Dim sql As String = "select * from users"
Dim da As New OleDb.OleDbDataAdapter(sql, con)
da.Fill(dt)

thanks for the help, i really appreciate it...
Er - is your database in the same path as your ASP code? If so, that presents a bit of a security risk. You don't want some erroneous error spewing out the name of the database therefore granting some user to be able to just plug that on the end of the web address and downloading it for their own nefarious use.

Okay...in your solution explorer single click your database object (the one with the yellow cylinder next to it) and in the properties window down below you may notice a "Copy to Output Directory" property that is likely marked as "Do not copy" change it to either option "Copy if newer" or "Always copy". That should transfer your database into your output folder when you publish.
Nov 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: john | last post by:
Access 2003 on my PC has stopped working. This is the help message I get ************************ Object library not registered The Visual Basic for Applications object library is no longer a...
10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
8
by: A P | last post by:
Hi! I'm using ASP.Net Web Matrix on my PC and wanting to publish the files to our server. I try to copy (thru explorer) the files but it didn't work! I receive Runtime Error: Server Error...
2
by: Harrie Verveer | last post by:
Hi, I'm building quiet a large webapplication (CMS) in ASP.NET. On localhost the application runs fine. For publishing we use 2 hosting providers at the moment (let's call those 'A' and 'B')....
1
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req):...
3
by: Steve Teeples | last post by:
I have a simple application built with several DLLs that access XML files for information. My local setup works just fine. As defined in my Install folder, the files are copied to the...
2
by: Max2006 | last post by:
Hi, After I right-click on my web application project file and choose "Publish ." and do the publishing, the result publishable files does not include the *.ashx files. Is it by design? How...
7
ADezii
by: ADezii | last post by:
There are essentially three techniques for publishing Access Data on the Web. The first technique is static, and does not allow for the dynamic addition or modification to the data, There is no...
2
by: Tino Donderwinkel | last post by:
Hi all, I have create a simple ASP.NET site that uses the ASP.NET Membership components. It uses a SQL Server as a provider. The application works fine when it's running on my own machine. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.