Solved

Exchange Database ODBC

Posted on 2001-08-01
4
287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 5 hours left to enroll

630 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