HighTechTalks DotNet Forums  

VFPODBC.DLL: "ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is not found."

Dotnet Framework (ODBC.net) microsoft.public.dotnet.framework.odbcnet


Discuss VFPODBC.DLL: "ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is not found." in the Dotnet Framework (ODBC.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
sleepyant
 
Posts: n/a

Default VFPODBC.DLL: "ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is not found." - 12-06-2004 , 12:08 AM






Hi. I'm using VB.net to access some FoxPro free data table. There are aabout
10 DBF files which I can make connection and using select command and fill
into a Data Adaptor with no problem. But there is 'one' particulatar DBF
file keep having problem. The file name is "transac.dbf" and whenever it
read the Data Adapter "Fill" method, it will give the message "VFPODBC.DLL:
ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is not
found.".

The following is my code:

Dim strConn As String = "Driver={Microsoft Visual FoxPro Driver}" & _
";UID=;SourceType=DBF;SourceDB=D:\Data;" & _
";Null=No;Deleted=Yes;Exclusive=No;Connect Timeout=10"

Dim Conn as OdbcConnection = New OdbcConnection(strConn)
Conn.Open

Dim Da As New OdbcDataAdapter
Dim Ds As New DataSet
Dim cmdSelect As New OdbcCommand

cmdSelect = Conn.CreateCommand
cmdSelect.CommandText = "SELECT * FROM transac"

Da.SelectCommand = cmdSelect

Da.Fill(Ds, "transac") ' <----- Error here.

What puzzle me is this only happen with this particlar table (transac.dbf),
and the rest works fine. I've tried to search for this kind of error but
couldn't find any. Please help. Thanks.



Reply With Quote
  #2  
Old   
sleepyant
 
Posts: n/a

Default Re: VFPODBC.DLL: "ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is not found." - 12-06-2004 , 07:48 PM






Ok, I guess I know what happen. It could be that one of the index key for
"transac.dbf" which require to "use" some other file as an alias. I think I
could solve it if I run several Foxpro Command (e.g. USE a ALIAS b, SELECT
0) before I open this "transac.dbf" table. But how can I run those Foxpro
command in VB.net, using the Odbc driver? Or is there a way I could ignore
the index key all together?

Please advise. Thanks in advance.


"sleepyant" <no (AT) nono (DOT) no> wrote

Quote:
Hi. I'm using VB.net to access some FoxPro free data table. There are
aabout
10 DBF files which I can make connection and using select command and fill
into a Data Adaptor with no problem. But there is 'one' particulatar DBF
file keep having problem. The file name is "transac.dbf" and whenever it
read the Data Adapter "Fill" method, it will give the message
"VFPODBC.DLL:
ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is
not
found.".

The following is my code:

Dim strConn As String = "Driver={Microsoft Visual FoxPro Driver}" & _
";UID=;SourceType=DBF;SourceDB=D:\Data;" & _
";Null=No;Deleted=Yes;Exclusive=No;Connect Timeout=10"

Dim Conn as OdbcConnection = New OdbcConnection(strConn)
Conn.Open

Dim Da As New OdbcDataAdapter
Dim Ds As New DataSet
Dim cmdSelect As New OdbcCommand

cmdSelect = Conn.CreateCommand
cmdSelect.CommandText = "SELECT * FROM transac"

Da.SelectCommand = cmdSelect

Da.Fill(Ds, "transac") ' <----- Error here.

What puzzle me is this only happen with this particlar table
(transac.dbf),
and the rest works fine. I've tried to search for this kind of error but
couldn't find any. Please help. Thanks.





Reply With Quote
  #3  
Old   
Cindy Winegarden
 
Posts: n/a

Default Re: VFPODBC.DLL: "ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is not found." - 12-08-2004 , 12:26 PM



Hi Sleepyant,

I think what you're running into is a "filtered" index which may rely on a
function call, for example. When you select data from a Fox table the data
engine reads the indexes to see what data it needs (reading an index is
faster than reading a table) and then retrieves only those rows it needs. Of
course, if there is no available index it will retrieve all the data and
then sort it out locally. You've used a "Select *" SQL command, and I'm not
sure whether that's your actual command or an example.

Do you have any access to FoxPro to open the table and see what the indexes
are? Alternatively, you can read the CDX with Notepad and try to find the
index expressions. When I open a CDX in Notepad I see some relatively empty
stuff at the beginning, followed by whitespace which has the index
expression in the middle of it, preceded by three "square" characters.
Following that is a bunch of "Greek" and then another band of whitespace
with the three squares and the index expression. Have a look and see if you
can provide any more useful information that I could use to attempt to
duplicate your situation.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden (AT) msn (DOT) com www.cindywinegarden.com


"sleepyant" <no (AT) no (DOT) no> wrote

Quote:
Ok, I guess I know what happen. It could be that one of the index key for
"transac.dbf" which require to "use" some other file as an alias. I think
I
could solve it if I run several Foxpro Command (e.g. USE a ALIAS b, SELECT
0) before I open this "transac.dbf" table. But how can I run those Foxpro
command in VB.net, using the Odbc driver? Or is there a way I could ignore
the index key all together?

Please advise. Thanks in advance.


"sleepyant" <no (AT) nono (DOT) no> wrote in message
news:%23lSNjl12EHA.3128 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
Hi. I'm using VB.net to access some FoxPro free data table. There are
aabout
10 DBF files which I can make connection and using select command and
fill
into a Data Adaptor with no problem. But there is 'one' particulatar DBF
file keep having problem. The file name is "transac.dbf" and whenever it
read the Data Adapter "Fill" method, it will give the message
"VFPODBC.DLL:
ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is
not
found.".

The following is my code:

Dim strConn As String = "Driver={Microsoft Visual FoxPro Driver}" & _
";UID=;SourceType=DBF;SourceDB=D:\Data;" & _
";Null=No;Deleted=Yes;Exclusive=No;Connect Timeout=10"

Dim Conn as OdbcConnection = New OdbcConnection(strConn)
Conn.Open

Dim Da As New OdbcDataAdapter
Dim Ds As New DataSet
Dim cmdSelect As New OdbcCommand

cmdSelect = Conn.CreateCommand
cmdSelect.CommandText = "SELECT * FROM transac"

Da.SelectCommand = cmdSelect

Da.Fill(Ds, "transac") ' <----- Error here.

What puzzle me is this only happen with this particlar table
(transac.dbf),
and the rest works fine. I've tried to search for this kind of error but
couldn't find any. Please help. Thanks.







Reply With Quote
  #4  
Old   
MichMat
 
Posts: n/a

Default RE: VFPODBC.DLL: "ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Variable ' ' is not found." - 12-22-2007 , 06:55 PM



I have the same exact problem, has anyone figgured out the solution?

From http://www.developmentnow.com/g/22_2...not-found-.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.