Results 1 to 3 of 3

Thread: conecct visual basec.net to microsoft access linked table

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2013

    conecct visual basec.net to microsoft access linked table

    i successfully link access database with hosted Mysql database and now i can see and edit data from linked table ,
    the problem when i connect vb.net application to this linked table thats only show header without any data

    this my connection string :
     {Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\Users\Mostafa\Documents\Visual Studio 2012\Projects\WindowsApplication11\WindowsApplication11\test.accdb"}
    Name:  Capture.JPG
Views: 288
Size:  33.2 KB
    *sorry for my bad langue
    Attached Images Attached Images  
    Last edited by za3pola3; Mar 1st, 2015 at 12:57 PM.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002

    Re: conecct visual basec.net to microsoft access linked table

    The reason there is no data has to do with the SQL query you are running. The connection string is only used to establish a connection, which must be working for you to have gotten as much as you are getting. In fact, since you have column names, you are getting back valid data, but no records. That can mean one of a couple different things:

    1) The WHERE clause in the SQL statement is constructed in such a way that no records match the criteria.

    2) The database has no data in it.

    3) You aren't actually working with the database that you think you are working with.

    That last one is not as crazy as it sounds. Lots of people have found that they ended up copying a blank database into a local folder and are connecting to that rather than the database that has the data in it. However, the first alternative is the most likely. Show us the SQL string you are using.
    My usual boring signature: Nothing

  3. #3
    Hyperactive Member
    Join Date
    Mar 2012

    Re: conecct visual basec.net to microsoft access linked table

    I suspect that because the table in Access is linked to a table in MySQL, that Access just has the database structure without any actual data... Why are you trying to connect to the database through the linked Access DB and not directly to the MySQL database? The only purpose to linking a table to Access is to use Access as the front end for entering in data, esp. since Access allows you to create forms for data-entry that may rely on using SQL statements when trying to do data manipulation on the back-end database. However since you will be using VB to create your forms, linking the MySQL database to Access isn't necessary and may lead to even worse complications.

Tags for this Thread

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