Solved

Outlook and SQL

Posted on 2000-04-13
3
240 Views
Last Modified: 2010-05-18
I am programming Outlook using VBA and I want to know if I can have a live connection to a SQL table through custom fields.
I have about 25,000 contacts that I need to have available to network users at a reasonable speed.
Is this possible?
0
Comment
Question by:kcmc
[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
  • 2
3 Comments
 

Expert Comment

by:saile01
ID: 2713980
it's possible to use sql table for making outlook contact
but can you tell more information for why do you want to use the  field ?
it's for fill a list box or something else ?
for making search into your sql database ?

0
 

Accepted Solution

by:
ozrs earned 100 total points
ID: 2714105
You can write a class in the VBA project that retrieves data, and make it available to a form.

You could also write a COM addin that does the same thing (only it will be faster as it is precompiled), or you could use a Custom Form that queries the SQL database using ADO to fill a listbox.

There are some courses you can go on to learn about this - I'm currently sitting in one that is being taught by an excellent presenter...   1593A - Developing Collaborative Solutions Using Outlook2000...
0
 

Expert Comment

by:saile01
ID: 2715021
Set Lst1 = ExpPages("Message").Controls("LstBox")

set conn = Application.CreateObject("adodb.connection")

conn.ConnectionTimeOut = 180
conn.open "dsnName","username","pasword"
set rsDetail= Application.CreateObject("adodb.recordset")
set rsDetail=conn.execute("select login_fullname,login_email from inetusers where Login_Level=50")

Do Until RSdetail.EOF
  Lst1.additem rsDetail.Fields("Login_Email")
rSdetail.MoveNext
Loop

this little code connect to an sql database, make a select and fill and listbox with the email of person in the db
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

728 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