fail to connect vfp odbc

Discussion in 'ASP .Net' started by Agnes, Aug 27, 2006.

  1. Agnes

    Agnes Guest

    (1)Session("ConnectionAuth") = "Provider = VfpOleDB.1;Data Source =
    d:\cgl\vfpmaster\ttsdata\tts.dbc"
    (2)Dim authConnection As New
    SqlConnection(Session("ConnectionAuth").ToString())
    There is an error in statment(2) , it said invalid ' provider'

    tts.dbc is my vfp database which located in my D drive. How can I connect my
    vfp database ??
    thanks in advance
    Agnes, Aug 27, 2006
    #1
    1. Advertising

  2. Agnes

    Agnes Guest

    Re: fail to connect vfp odbc[Renew Question]

    I change by sqlconnection into OLE dbconnection.
    Session("ConnectionAuth") = "Provider = VfpOleDB.1;Data Source =
    d:\cgl\vfpmaster\ttsdata\tts.dbc"

    Dim authConnection As New
    OleDbConnection(Session("ConnectionAuth").ToString())
    Dim authCommand As String = "select loginid from coinfo
    where loginid = @cocode "
    Dim oleCommand As New OleDbCommand(authCommand,
    authConnection)

    oleCommand.Parameters.Add(New OleDbParameter("@cocode", 10))
    oleCommand.Parameters("@cocode").Value = UserName
    oleCommand.Parameters.Add(New OleDbParameter("@pwd", 50))
    oleCommand.Parameters("@pwd").Value = UserPassword
    authConnection.Open() <-- error

    Error "'VfpOleDB.1' ´£¨ÑªÌ¨Ã¥¼µn¿ý©ó¥»¾÷¹q¸£¤W¡C" String
    for english version it said [the user didn't login the machine| (Any thing
    wrong in my session|") ??
    thnaks
    Agnes, Aug 27, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JeffP@Laptop

    dBase VFP OleDb or ODBC Drivers

    JeffP@Laptop, Jan 25, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,757
    JeffP@Laptop
    Jan 25, 2006
  2. Wenjie

    if (f() != FAIL) or if (FAIL != f())?

    Wenjie, Jul 28, 2003, in forum: C Programming
    Replies:
    3
    Views:
    425
    E. Robert Tisdale
    Jul 31, 2003
  3. Agnes

    odbc with vfp

    Agnes, Aug 16, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    466
    Cindy Winegarden
    Aug 17, 2006
  4. Agnes

    fail to open vfp odbc

    Agnes, Aug 27, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    508
    Cindy Winegarden
    Aug 28, 2006
  5. Agnes

    oledb connect to vfp

    Agnes, Sep 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    357
    Agnes
    Sep 7, 2006
Loading...

Share This Page