Solved

Exchange Database ODBC

Posted on 2001-08-01
4
283 Views
Last Modified: 2012-05-04
How can I access my Exchange Database by ODBC? This includes updating user information such
as phone numbers.
0
Comment
Question by:Kriscott
4 Comments
 
LVL 5

Accepted Solution

by:
rkot2000 earned 200 total points
ID: 6341330
1. you can link exchage to msaccess 2000
2. i did some development with ldap and ado:
ldap is free from microsoft.

server = "001-expo9-d"

LastName = txtLastName.Text

'strQuery = "<LDAP://" + server + _
'    ">;(&(objectClass=organizationalPerson)(rdn=" + _
'    LastName + "));cn,adspath,Assoc-NT-Account,givenName,Title,Department,Company,Hide-From-Address-Book,l,st,PostalCode,Co,telephoneNumber,rfc822Mailbox;subtree"

strQuery = "<LDAP://" + server + _
    ">;(&(objectClass=organizationalPerson)(sn=" + _
    LastName + "));cn,givenName,telephoneNumber;subtree"
   
strQuery = "<LDAP://" + server + _
    ">;(&(objectClass=organizationalPerson)(sn=" + _
    LastName + "));cn,givenName,telephoneNumber,Deparment;subtree"
   
strQuery = "<LDAP://" + server + _
    ">;(&(objectClass=organizationalPerson)(sn=" + _
    LastName + "));cn,sn,name,postalAddress,department;subtree"
   
   
'   LDAP                    Exchange
'
'   Name                    Alias
'   givenName               Given Name
'   sn                      SurName
'   Title                   Title
'   Deparment               Department
'   Company                 Company
'   postalAddress           Address
'   l                       City
'   st                      Street
'   PostalCode              Postal Code
'   Co                      Country
'   telephoneNumber         Telephone Number
   
   
Set objRS = New ADODB.Recordset
objRS.CursorLocation = adUseClient

Set objRS = ADOConn.Execute(strQuery)

If objRS.BOF And objRS.EOF Then
  MsgBox ("Person not found")
Else
  Dim x As Recordset
  Dim f As Field
  Dim i As Long
  Set x = New ADODB.Recordset
  For Each f In objRS.Fields
    x.Fields.Append f.Name, f.Type, f.DefinedSize
  Next
  x.Open
  objRS.MoveFirst
  For i = 0 To objRS.RecordCount - 1
    x.AddNew
    For Each f In objRS.Fields
      x.Fields(f.Name).Value = objRS.Fields(f.Name).Value & " "
    Next
    x.Update
    objRS.MoveNext
  Next
  'Set x = objRS
  x.MoveFirst
  Set SSOleDBGrid1.DataSource = x
  'se
'  SSOleDBGrid1.ReBind
 '  MsgBox objRS.RecordCount
   
'        While Not objRS.EOF
'            If objRS.Fields("givenname") = txtFirstName.Text Then
'        txtPhoneNumber.Text = objRS.Fields("telephoneNumber").Value
'        Exit Sub
'        End If
       
       
       
'        objRS.MoveNext
'   Wend
   
End If
End Sub

Private Sub getConnection()
Set ADOConn = CreateObject("ADODB.Connection")

    ADOConn.Provider = "ADSDSOObject"
    ADOConn.Open "ADs Provider"
   
End Sub
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6342450
hearing...
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7198380
Hi Kriscott,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept rkot2000's comment(s) as an answer.

Kriscott, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7213208
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question