Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old October 6th, 2008, 06:52 PM
Registered User
Join Date: Oct 2008
Location: Union City, Ca, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ODBC to text driver

I am using the following code to read records from a SQL 3 table and it works. When using a connection to a text file driver I get an error that I can not use ODBC to import from a Microsoft jet database.
Public Function ChkAgent(Fname, Lname As String) As Integer
 Dim db As DAO.Database
    Dim rs As DAO.Recordset
     Set db = OpenDatabase("", True, True, Connect:="DSN=Agents;")
    Set rs = dbs.OpenRecordset("select [first name],[last name] from people.csv where ucase([first name]) =ucase('Jessica') and ucase([last name])=ucase('smith');")
        ChkAgent = rst.RecordCount
    Set rs = Nothing
    Set db = Nothing
End Function

Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect using MYOB ODBC driver mat41 Classic ASP Professional 0 August 7th, 2008 12:56 AM
ODBC driver creation densam ADO.NET 0 January 4th, 2006 05:00 AM
SQL ODBC Driver Pragnesh1205 SQL Server 2000 6 October 31st, 2005 12:15 PM
Rdb ODBC Driver Eron Oracle 0 March 9th, 2005 03:32 AM
ODBC driver for Teradata clueless_may Access VBA 0 November 1st, 2004 10:00 AM

All times are GMT -4. The time now is 02:41 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.