VB and Access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric

    #1

    VB and Access

    Anyone know where I can get some good free info on storing user names and
    password in Access. I tried Google but I am not keywording it correctly.

    Thank you
    Eric in Tampa


  • R. L'abée

    #2
    Re: VB and Access

    "Eric" <eparker7@tampa bay.rr.com> schreef in bericht
    news:qx%kb.3490 $ox6.36028@twis ter.tampabay.rr .com...[color=blue]
    > Anyone know where I can get some good free info on storing user names and
    > password in Access. I tried Google but I am not keywording it correctly.
    >
    > Thank you
    > Eric in Tampa
    >[/color]




    Well ok, here is an example, it writes the information to a MS Acccess 2000
    database.
    Make sure you activate the reference "Microsoft ActiveX Data Object 2.7
    Library"

    '--------------------------------------------------------------------
    Dim DbaseCon As New ADODB.Connectio n
    Dim DbaseRecord As New ADODB.Recordset
    Dim DbasePath as string

    DbasePath = "C:\MyDB.md b"

    DbaseCon.Connec tionString = "Provider=Micro soft.Jet.OLEDB. 4.0;data
    source=" & _
    DbasePath & ";Jet OLEDB:Engine Type=5;"
    DbaseCon.Open
    DbaseRecord.Ope n "insert into MyTable values('Info1', 'Info2')",
    DbaseCon, adOpenDynamic, adLockOptimisti c

    'Close the connection, important:
    If DbaseCon.State = adStateOpen Then DbaseCon.Close
    Set DbaseRecord = Nothing
    '--------------------------------------------------------------------

    Reinier


    Comment

    Working...