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
Solved

Outlook and SQL

Posted on 2000-04-13
3
237 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

If you don't know how to downgrade, my instructions below should be helpful.
Read this checklist to learn more about the 15 things you should never include in an email signature.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
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…

829 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