Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote Views (Access)
Message
 
To
08/04/2003 10:19:32
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00775086
Message ID:
00775193
Views:
18
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
Map
View

Click here to load this message in the networking platform