Henry,
Instead of ([Access FinData]) you need a valid datasource name as it is in the ODBC ini file.
Try this:
Local lnConnect, lcTable
lnConnect = SqlConnect() && here you should see the dialog to choose from connections or datasources
Access_FinData=sqlgetprop(lnConnect,"DATASOURCE")
* Create a named connection
Create Connection FinConnect datasource (Access_FinData)
* Get a list of tables in Access database
=SqlTables(lnConnect,[TABLE],[crsAccess])
* Popluate preview grid
lcTable = [activity]
* Create View
Create Sql View vPreviewAccess connection FinConnect As ;
Select * From (lcTable) Order By 1
Use vPreviewAccess In 0
*---
Good luck
>Hi,
>
>I am having a problem with the following code:
>
>=============================
>Local lnConnect, lcTable
>* Create a named connection
>Create Connection FinConnect ;
> DataSource [Access FinData]
>* Create a connection handle for the SqlTables command
>lnConnect = SqlConnect([Access FinData])
>* Get a list of tables in Access database
>=SqlTables(lnConnect,[TABLE],[crsAccess])
>*Thisform.FillAccess() && Fills Access list of tables
>* Popluate preview grid
>*lcTable = Thisform.aList1[Max(1,Thisform.lstAccess.Listindex)]
>lcTable = [activity]
>* Create View
>Create Sql View ([vPreviewAccess]) Remote ;
> Connection FinConnect Share ;
> As Select * From &lcTable Order By 1
>Use vPreviewAccess In 0
>*Thisform.grdAccess.RecordSource = [vPreviewAccess]
>=============================
>
>Problem:
>The ODBC datasource has no Database name entered. So, it should prompt
>for one. Why is it prompting 3 times ?
>
>Any help would be appreciated,
>
>Henry
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only