Solved

Exchange Database ODBC

Posted on 2001-08-01
4
281 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now