Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2003, 01:22 PM
Authorized User
 
Join Date: Dec 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO connecting to a Paradox 8.0 table

Can someone tell me what is wrong with my code?

Option Compare Database
Option Explicit

Dim aConn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sSql As String

Function TransferData()
aConn.Open "Driver={Microsoft Paradox Driver (*.db )};" & _
           "DriverID=538;" & _
           "Fil=Paradox 8.0;" & _
           "DefaultDir=P:\Fleet\;" & _
           "Dbq=P:\Fleet\;" & _
           "CollatingSequence=ASCII"

Set rs = New ADODB.Recordset
sSql = "SELECT * FROM Fleet.db"
    rs.Open sSql, aConn

Do While Not (rs.EOF Or rs.BOF)
sSql = "INSERT INTO AccessTable (Date,Time) Values (rs(1), rs(2))"
CurrentDb.Execute (sSql)
rs.MoveNext
Loop

End Function









Similar Threads
Thread Thread Starter Forum Replies Last Post
Create table from another table using ADO Kaustav Pro VB Databases 0 October 15th, 2005 05:44 AM
Update the Paradox table myunus SQL Server DTS 1 August 19th, 2005 11:28 PM
connecting to Paradox 7 mikeuk PHP Databases 2 August 27th, 2004 06:28 AM
Connecting to Oracle 9i through ADO.NET conjurer ADO.NET 2 August 26th, 2003 06:56 PM
Connecting to Paradox Table using ASP crobarian Classic ASP Databases 0 July 24th, 2003 03:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.