Results 1 to 3 of 3

Thread: [3.0/LINQ] access DB questions

  1. #1

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    [3.0/LINQ] access DB questions

    Hi all

    I have two questions

    1) when i try to connect to a database using
    "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;"

    as my access string i keep getting the error

    The 'Microsoft.ace.oledb.12.0' provider is not registered on the local machine.

    I have been googleing but havent found an answer yet does anyone know what this means.



    2) have the sql query that i developed in excel

    "SELECT Games.Pubdate, Games.LeagueID, Leagues.League, Games.Home, Games.Visitor, Games.Start, Games.End
    FROM `C:\Documents and Settings\rbarbrow\Desktop\edops db\EdOps_be`.Games Games, `C:\Documents and Settings\rbarbrow\Desktop\edops db\EdOps_be`.Leagues Leagues
    WHERE Games.LeagueID = Leagues.LeagueID AND ((Games.Pubdate Is Not Null) AND (Games.End Is Not Null))"


    but im not sure how to develop it that the paths are no there . would it just be from Games , Leagues?

    thanks

  2. #2

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    Re: [3.0/LINQ] access DB questions

    DOh

    I got number 1)

    I mistakenly was useing the 2007 connection string
    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=; is the correct string

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [3.0/LINQ] access DB questions

    The FROM clause simply contains the tables you want to get the data from. Excel requires a modified syntax because it's not a real database. Access is and therefore just requires regular SQL syntax. Access also has a Jet SQL reference, so you should have consulted that first.

    Also, that is old join syntax. You should perform a join explicitly:
    SQL Code:
    1. SELECT ChildTable.ChildColumn, ParentTable.ParentColumn
    2. FROM ChildTable
    3.     INNER JOIN ParentTable
    4.         ON ChildTable.ParentID = ParentTable.ParentID
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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