Results 1 to 8 of 8

Thread: Publishing Program

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2013
    Posts
    139

    Publishing Program

    Once published and a setup.exe is created I install and receive this error.

    Code:
    System.Data.OleDb.OleDbException (0x80004005): Could not find file 'C:\Users\xxxxx\AppData\Local\Apps\2.0\Data\AXLT1M3N.JKW\CHJCOJ1A.E8O\cont..tion_70f952949232a67c_0001.0000_4adc3c97f77cd12d\Data\ConYear.accdb'.
       at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
       at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.OleDb.OleDbConnection.Open()
       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
       at WindowsApplication1.ConYearDataSetTableAdapters.InputDataGridTableAdapter.Fill(InputDataGridDataTable dataTable)
       at WindowsApplication1.Main.Form1_Load(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Well de-bugging works great connection to the database seems to be good cause I double check through a grid and also have done through the debug file in the project folder just to make sure things have saved. Now this is out of my realm anybody have any ideas or seen this before.

    Thanks

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Publishing Program

    The error is 'could not find file'. How difficult can that be to interpret?

    Unless you have a user on your system with a registered name of 'xxxxx', I'd say that would be the first thing to look at!
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: Publishing Program

    It looks like it couldn't find the file Data\ConYear.accdb ... so THAT's where I'd look first... DID you actually include the Access file when publishing? I suspect one of two things:
    1) The Access file wasn't included as part of the output.
    2) It is part of the output, but IS NOT in the Data folder ... but rather in the app folder in the first place.


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 2013
    Posts
    139

    Re: Publishing Program

    Quote Originally Posted by dunfiddlin View Post
    The error is 'could not find file'. How difficult can that be to interpret?

    Unless you have a user on your system with a registered name of 'xxxxx', I'd say that would be the first thing to look at!
    I x'd out my name in the extension of the file....

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 2013
    Posts
    139

    Re: Publishing Program

    Quote Originally Posted by techgnome View Post
    It looks like it couldn't find the file Data\ConYear.accdb ... so THAT's where I'd look first... DID you actually include the Access file when publishing? I suspect one of two things:
    1) The Access file wasn't included as part of the output.
    2) It is part of the output, but IS NOT in the Data folder ... but rather in the app folder in the first place


    -tg
    I'll check that out could be #2!
    Let you know

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: Publishing Program

    The first thing to do is to open the Application Files dialogue from the Publish page of the project properties and see whether the data file is listed there and, if so, how it's configured.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jul 2013
    Posts
    139

    Re: Publishing Program

    Quote Originally Posted by jmcilhinney View Post
    The first thing to do is to open the Application Files dialogue from the Publish page of the project properties and see whether the data file is listed there and, if so, how it's configured.
    It's located in the Application Files dialogue, Publish Status = Include, download group = required, hash = included.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jul 2013
    Posts
    139

    Re: Publishing Program

    The accdb file is located in my project file I don't see how its throwing this error cause everything seems to be in place.

    I actually went into the app.xml file, checked the DataSource and for some reason it has [DataDirectory] then the files extension. Fixed the extension and works now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width