Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

what the problem with this code

Discussion in 'Information Technology' started by alecarnero, Oct 27, 2005.

Tags:
  1. alecarnero

    alecarnero
    Expand Collapse
    Guest

    I have write this code for populate one access form , i m working with
    access XP,

    Private Sub Form_Load()
    DoCmd.Maximize

    Dim cn As ADODB.Connection
    Dim rs As ADODB.Recordset

    Set cn = New ADODB.Connection
    Set rs = New ADODB.Recordset

    cn.Provider = "Provider=Microsoft.Jet.OLEDB.4.0"
    cn.ConnectionString = "Data Source=E:\work\center\cadastro.mdb"
    cn.Open

    rs.Open "tbcliente", cn, adOpenDynamic, adLockReadOnly, adCmdTable

    rs.MoveFirst
    rs.close
    cn.close

    End Sub

    I have this error "3706" "Provider cannot be found"

    Thanks in advance

    Alejandro Carnero
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Sikhs Face Problems While Carrying Kirpans In Khyber-Pakhtunkhwa - SikhSiyasat.Net Breaking News Jul 29, 2016
    "Dasam" Granth - A Look At The Core Problems Dasam Granth Oct 21, 2015
    Problems In Life Sikh Sikhi Sikhism Apr 13, 2015
    How can I make decent and useful friends and from where ?? most people have a problem with me Sikh Youth Oct 23, 2013
    The Problem with Taking Too Many Vitamins Health & Nutrition Oct 18, 2013

  3. Van T. Dinh

    Van T. Dinh
    Expand Collapse
    Guest

    Try:

    cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=E:\work\center\cadastro.mdb;"
    cn.Open


    --
    HTH
    Van T. Dinh
    MVP (Access)



    "alecarnero" <alecarnero@uol.com.br> wrote in message
    news:eoeEMEk2FHA.2292@tk2msftngp13.phx.gbl...
    >I have write this code for populate one access form , i m working with
    > access XP,
    >
    > Private Sub Form_Load()
    > DoCmd.Maximize
    >
    > Dim cn As ADODB.Connection
    > Dim rs As ADODB.Recordset
    >
    > Set cn = New ADODB.Connection
    > Set rs = New ADODB.Recordset
    >
    > cn.Provider = "Provider=Microsoft.Jet.OLEDB.4.0"
    > cn.ConnectionString = "Data Source=E:\work\center\cadastro.mdb"
    > cn.Open
    >
    > rs.Open "tbcliente", cn, adOpenDynamic, adLockReadOnly, adCmdTable
    >
    > rs.MoveFirst
    > rs.close
    > cn.close
    >
    > End Sub
    >
    > I have this error "3706" "Provider cannot be found"
    >
    > Thanks in advance
    >
    > Alejandro Carnero
    >
    >
     

Share This Page