Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Example
Message
From
30/04/2002 13:08:40
 
General information
Forum:
ASP.NET
Category:
Visual FoxPro Toolkit for .NET
Miscellaneous
Thread ID:
00650925
Message ID:
00650971
Views:
22
This message has been marked as the solution to the initial question of the thread.
Hi, Kirk-

> the IDE the OleDbConnection is underlined and says Type OleDbConnection is not defined.
> It also shows the goView as not declared. I don't know how to fix these. Any help for
> the VB challanged greatly appreciated.

Use the following instead (there were two variables not defined).
    'Establish a connection and a command 
    Dim lcConnectionString As String
    Dim lcSQL As String
    Dim oConn As OleDb.OleDbConnection
    Dim goView As Data.DataView</font>

    'Get the connection string and sql statement
    lcConnectionString = "Provider=vfpoledb.1;Data Source='C:\Program Files\Microsoft Visual FoxPro 7\Samples\Data\testdata.dbc';password='';user id=''"
    lcSQL = "Select * from customer"

    'Connect to the Database, execute the query and disconnect
    'SqlConnect(), SqlExecute(), SqlDisconnect()
    oConn = SqlConnect(lcConnectionString)
    goView = SqlExecute(oConn, lcSQL, "CustomerList")
    SqlDisConnect(oConn)
    'Select the default cursor
    VFPToolkit.vfpData.Select(goView)
    Browse()
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform