Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default link excel to paradox

does any body knows how can i link a paradox database from excel using macro
code...
i want some of the information in my data base to appear in the spreadsheet
when whenever i want it.

if you have any example it will be great please...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default link excel to paradox

You can do this without having to code anything.

Data menu, choose "Get External Data" then "New Database Query"
From the list choose Paradox if it is there (if not check Paradox
documentation or Paradox support site regarding how to set up ODBC driver)
After that you should get into Microsoft Query - acts sort of like the query
design screen in MSAccess. See help files once in there.
When done, choose from MSQuery File menu "Return data to Microsoft Excel."
Right-clicking on results table lets you set various properties or set up
any parameters.

For more info search this group on topic MSQuery.
--
- K Dales


"chato" wrote:

does any body knows how can i link a paradox database from excel using macro
code...
i want some of the information in my data base to appear in the spreadsheet
when whenever i want it.

if you have any example it will be great please...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default link excel to paradox



i know i can do it that way, but it is not what i need...
because i have a spreadsheet where i want to introduce a code, so with this
code i need the macro to make a search in tha database and then put the
information that it found in my spreadsheet...

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default link excel to paradox

The more general approach then is to use ADO. Add "Microsoft ActiveX Data
Objects" to your references. The basic idea is as follows - the details, of
course, depend on exactly what you want to do:

Sub TestADO()
Dim MyDB as ADODB.Connection ' This will be your "link" to the paradox
database
Dim MyRS as ADODB.Recordset ' This will store the results of your query
Dim CStr as String ' the connection string; specifies the database driver
and file
Dim SQLStr as String ' for building your SQL query

CStr = "?" ' You would need to find the proper connection string for your
database; consult documentation or online support (e.g. search net for
"paradox connection string")
Set MyDB = New ADODB.Connection
MyDB.Open CStr ' Opens the database connection

Set MyRS = New ADODB.Recordset ' prepare the recordset
' You may want to set your recordset properties here, e.g. cursor type,
cursor location; see ADO documentation
SQLStr = "?" ' write a query in SQL and store it in a string variable
MyRS.Open SQLStr, MyDB ' executes the query

While Not(MyRS.EOF) ' Loop through the result set
' Show the first field name and value:
MsgBox MyRS.Fields(1).Name & ": " & MyRs.Fields(1).Value
' Any other fields will be referenced in the same way
WEnd

MyRs.Close ' Be sure to close the recordset
MyDB.Close ' Important to close the connection!

Set MyRs = Nothing
Set MyDB = Nothing

End Sub

For specifics, the documentation for ADO can be found he
http://msdn.microsoft.com/library/de...Technology.asp
--
- K Dales


"chato" wrote:



i know i can do it that way, but it is not what i need...
because i have a spreadsheet where i want to introduce a code, so with this
code i need the macro to make a search in tha database and then put the
information that it found in my spreadsheet...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Pivot Table from a Paradox File Erika Excel Discussion (Misc queries) 0 April 27th 09 03:57 PM
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. tln Links and Linking in Excel 0 April 22nd 07 04:28 PM
data from Paradox to Excel Kev SCL Setting up and Configuration of Excel 2 July 3rd 06 03:29 AM
import paradox database into excel fange Excel Discussion (Misc queries) 1 August 19th 05 03:20 PM
Paradox then paste into excel Steved[_3_] Excel Programming 6 June 1st 04 05:04 AM


All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"