Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Exchange Database ODBC

Posted on 2001-08-01
4
Medium Priority
?
289 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 800 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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

688 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