Problem Querying A Visual Foxpro DBF

Jan 3, 2007

Good day,

Current Setup:

Using:
Visual Web Developer Express
SQL Express
IIS 6.0 with >net 2.0 Installed
Visual Foxpro

I actually have two questions (but am making good progress so will focus on the issue at hand).

1. I setup a Login.aspx / Default.aspx / Register.apsx / Membership.aspx as specified in the examples in MSDN...all is working ok.

2. When I register a new user, I wanted to capture their Customer ID during login to store in their Membership view table. I did this and is working ok....and to make it easy, am storing the value in Comments field.

3. I want to query a Visual Fox free table (DBF) that contains my client's Customer Invoice data...and have the ODBC Connection setup and working properly.

Here's the problem....

I'm having trouble formulating the SELECT string within the asp code to capture the Membership.Comments field.

I need the proper functions to grab the Comments field data and then use it within my select statement.

Presently, the query works if I just hard-code the value i.e.

"SELECT * from [invdata] WHERE cus_no = '1' "

I need to replace the '1' with the comments field data.

Thanks:

On a side issue: it took me days to just to get this all working to where it is...does anyone have a detailed example of how to Login to a site and pass the parms to another page to query the Logged In user's data from a database......a real world example that I have yet to see highlighted anywhere in the Forums or books I've bought.

For example: I am customer ABC123, I log in to my vendor's site and want to see all my orders placed.









View 1 Replies


ADVERTISEMENT

DTS: Visual FoxPro To SQL Server

Jul 15, 2004

Hi,

Today was my first day to use DTS. I tried to transfer a Visual FoxPro Database to my SQL Server. I noticed that I am getting errors on the data that contains date fields. So, for testing purposes I transformed the Visual FoxPro fields that contained datefields into char fields. And this works, but obviously I cannot hunt around in a huge database looking for datefields in tables and change them manually. Plus, by changing to char fields I noticed that those fields that are empty are transformed as 1899-12-30. :p

Does anyone have any ideas?

Thanks,
Laura

View 3 Replies View Related

Microsoft OLE DB Provider For Visual FoxPro 9.0

Feb 27, 2007

Im quite interested to see if any one is using Microsoft OLE DB Provider for Visual FoxPro 9.0 in an SSIS package. Is it possible to use this for free table directory like you can with the ODBC driver. ????

thanks kindly



My basic proccess is as follows: The source foxpro database has hundreds of dbf files ---the SSIS procress is as follows

1: Copy only required dbf files and/or matching .fpt files over to local drive on SSIS box(we only need 10 files)

use MS Visual Foxpro ODBC driver (free table option) and set up a system DSN--dataflow tab---datareader source--and away you go

View 1 Replies View Related

Visual FoxPro Linked Server

Jun 19, 2007

I am trying to add a FoxPro linked server to MS SQL 2005, and I can't seam to create a linked server that works. What am I doing wrong in linking the server?



I have an ODBC connection that worked but not OLEDB; how can I do this with OLEDB (either VFPOLEDB or Jet, if it will work) and not ODBC.



This is what I thought was right




Code Snippet

sp_addlinkedserver 'test',

'FoxPro',

'VFPOLEDB',

'C:DataSomeDatabase.dbc',

NULL,

NULL,

NULL



But it gives the error:

Cannot create an instance of OLE DB provider "VFPOLEDB" for linked server "test".



Also I know in MS SQL 2000 once you linked a server you could view it in EM, but when I linked the VFP via ODBC I could query agianst it, but I could not open it in Mangament Studio.



Thank you in advance.

View 11 Replies View Related

Linked Server To Visual FoxPro Not Work

Feb 20, 2005

I've downloaded and installed the latest VFPOLEDB (12/04) on 2 separate SQL Server boxes.

In both cases, If I connect to SQL Server with Query Analyzer as (local) while on a box, the linked server to my foxpro database works fine with openquery().

However, If I'm at one box and attached to SQL Server on the other box, the openquery() fails.

Here's some particulars:
---
EXEC sp_addlinkedserver
@server='VFP',
@provider='VFPOLEDB',
@datasrc='\hdmcpdctis1 isrnddata',
@srvproduct='Visual FoxPro'

--this works on either (local) box
SELECT *
FROM OPENQUERY(VFP, 'select * from tislists')
Go

--but, the same openquery() above doesn't work if the box I'm running it from is attached to the SQL Server on the other box. I get:

Server: Msg 7302, Level 16, State 1, Line 1
Could not create an instance of OLE DB provider 'VFPOLEDB'.
OLE DB error trace [Non-interface error: CoCreate of DSO for VFPOLEDB returned 0x80040154].
=====================
One other approach I tried that works while on the (local) box, but fails when attached to the SQL Server on the other box:

select * from openrowset('MSDASQL',
'Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB= \hdmcpdctis1 isrnddata ',
'select * from [tislists.DBF]')


With error:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC Driver Manager] Driver does not support this function]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: ].
===========================

Any Help is greatly appreciated! Thanks,

peter :confused:

View 5 Replies View Related

Linked Server For Visual Foxpro (DBF) Table

Jul 13, 2015

I'm running SQL Server 2008 (x64) version.

How can i create a linked server for Microsoft Visual Foxpro databases ?

I'm using Microsoft.ACE.OLEDB.12.0 driver.

I success create a linked server, and can browse all tables from linked server connections, but why when query data using

SELECT * FROM OPENQUERY(PIP_TEST,'select * from tbctrl')

It getting error message

Cannot process the object "select * from tbctrl". The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "pip_test" indicates that either the object has no columns or the current user does not have permissions on that object.

View 6 Replies View Related

How To Access Visual FoxPro Data From SQL Server ?

Jul 23, 2005

I'm trying to access Visual Fox Pro Data from Sql Server 2000, Cananyone have any Idea ?Thanks

View 1 Replies View Related

Importing Visual Foxpro Tables Into SS2005

Jun 28, 2007

Windows XP Pro - Sql Server 2005 Management Studio (current) - current visual foxpro oledb driver



I have an origin data folder with many foxpro dbf files



When I go through the "wizard" to import data from the origin folder using the "free table" option, I can locate the folder just fine. The form shows me a list of the files in the folder - but I cannot scroll through the list.



When I select the folder and continue, I test the connection and get a message that it is fine.



Then I go on to actually import tables. The list that is presented of tables that I can import does not include all the dbf files in the folder. There are 207 files in the origin folder, but only a fraction (about 120) of those show up in the list as candidates to be imported. I cannot see a pattern to the ones that are excluded from the list.



Does anyone know what could be causing this strange behavior?



Thanks.

View 3 Replies View Related

Does Anyone Know How To Execute A SSIS Package From Visual Foxpro?

Nov 13, 2007

This is a Execute DTS from VFP Example I found. Does anyone have a snippet for executing an SSIS package?

Thanks,
Shannon

*!* Create a DTS Package Object
dtsPkg=CREATEOBJECT('dts.package')

*!* LoadFromStorageFile() requires the following parameters:
*!* UNC path to the .DTS file to be executed
*!* User Password

*!* Load the package to be executed from a file.
dtsPkgName=dtsPkg.LoadFromStorageFile("\UNC_Path_toDTSPkgBeta.dts","User_Password")
*!* Execute the DTS Package
dtsPkg.Execute
*!* Release the DTS Package
RELEASE dtsPkg

View 1 Replies View Related

OLEDB Error When Using Visual FoxPro Driver

Aug 30, 2007

Hi all,

I created a package that extracts records from a .DBF file into an SQL Server database. I installed a Visual FoxPro plugin (vfpoledb). When I run the package from my PC, it runs smoothly. But, when I try to run the same package in another PC, it displays a DTS_E_OLEDBERROR "Class not registered" error. Anyone has an idea about what this means? thanks in advance.

View 3 Replies View Related

DTS Import To SQL Server 2000 From Visual FoxPro

May 17, 2007

Greetings,



I am unsure if this is the correct forum to send this question, but I can't seem to find any information regarding this problem. If this is the wrong place, please direct me to the correct spot.



I am attempting to import data from a free tables FoxPro database to SQL 2000 using a DTS Package which has worked correctly every day for the past 2 years. Yesterday, I got an error.



The package has around 10 tables that it deletes, re-creates, and populates with data from the Foxpro. All of the tables except one work correctly.



When I try to do an explicit import using the ODBC connection to populate that one table, I get the following error: Context: Error calling Openrowset on the provider.



I created an access database on my local computer and setup an ODBC connection and link tables to the database to see if it would work, and it did. So I thought there might be something wrong with the ODBC data source on the SQL Server, so I deleted it and created a new one, used it and I receive the same error.



I thank you in advance for any assistance or direction you can provide me for finding an answer.



View 4 Replies View Related

OPENROWSET Using Visual FoxPro Provider Error 'Could Not Fetch A Row'

Jun 20, 2006

Hi,
I have 2 separate clients experiencing this problem,
Both systems are
1.Win 2000 Server with Small Business Server 2000 (SP4)
2.SQL Server 2000 (SP2 upgraded to SP4, SP4)
3.Exchange
4.IIS etc

We use SQL Server to connect to FoxPro 2.6 Tables.

We are using OPENROWSET as follows:

Select * from openrowset('VFPOLEDB.1','C:Client Data';;,'Select * from cm')

We are now getting this error:
Server: Msg 7330, Level 16, State 2, Line 1 Could not fetch a row from OLE DB provider 'vfpoleDB.1'. OLE DB error trace [OLE/DB Provider 'vfpoleDB.1' IRowset::GetNextRows returned 0x80040155].

The statement worked up until around 20 days ago, which made us think that it may be windows updates/sps/hotfixes, but i have installed the above on a test machine and installed all windows updates and the test machine works AOK.

Has anybody seen this error?

Thanks in advance
Q

View 2 Replies View Related

SQL 2012 :: Import Visual FoxPro Tables Into Database

Aug 7, 2014

How can I add the option to import data from Visual FoxPro tables into SQL 2012 database?

View 0 Replies View Related

OPENROWSET Using Visual FoxPro Provider Error 'Could Not Fetch A Row'

Jun 20, 2006

Hi,

I have 2 separate clients experiencing this problem,

Both systems are

Win 2000 Server with Small Business Server 2000 (SP4)
SQL Server 2000 (SP2 upgraded to SP4, SP4)
Exchange
IIS etc

We use SQL Server to connect to FoxPro 2.6 Tables.

We are using OPENROWSET as follows:

Select * from openrowset('VFPOLEDB.1','C:Client Data';;,'Select * from cm')

We are now getting this error:

Server: Msg 7330, Level 16, State 2, Line 1 Could not fetch a row from OLE DB provider 'vfpoleDB.1'. OLE DB error trace [OLE/DB Provider 'vfpoleDB.1' IRowset::GetNextRows returned 0x80040155].

The statement worked up until around 20 days ago, which made us think that it may be windows updates/sps/hotfixes, but i have installed the above on a test machine and installed all windows updates and the test machine works AOK.

Has anybody seen this error?

Thanks in advance

Q

View 7 Replies View Related

The Parameter Is Incorrect. (Microsoft OLE DB Provider For Visual FoxPro) After SP1

May 1, 2006

Having installed SP1, my SSIS packages using the OLE-DB Provider for Visual Foxpro no longer work. Using the latest version obtained from here:

http://www.microsoft.com/downloads/details.aspx?FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en

When attempting to create one SSIS from scratch, the message thrown is:

"The parameter is incorrect. (Microsoft OLE DB Provider for Visual FoxPro)."

The radio button option of "Copy data from one or more tables or views" and then selecting the "Next >" throw the error.

It has to be the SP1 causing the problem because nothing else changed on the Server and everything was working fine prior to this.

Microsoft, any feedback on this??

View 25 Replies View Related

Query Server Error When Accessing Visual FoxPro 9.0 Via ODBC

Nov 6, 2007



I have a report that accessed a Visual FoxPro 6.0 database via ODBC. Since I upgraded to Visual FoxPro 9.0, now I am getting the error:

Query Server Error
DMS-E-RBI_TABLE The table or view <table name> was not found in the dictionary

I've verified that the right path is setup and I've tried installing about every driver and none of them are working. I created a new database in 9.0 and the I can access it fine. Also, there are old tables that are accessible in the same path, just not the ones I need. Any ideas would be helpful..

View 1 Replies View Related

SQL Triggers: Transfer Data From SQL Server 2000 To Visual FoxPro DBase

Jul 23, 2005

Hi all,I am fairly new to using triggers and was seeking some help from thosethat have experience with them. I am looking to transfer data from aSQL 2000 database to a Visual FoxPro database on another computer. Iwould like to transfer about three fields of data to a VFP table eachtime an insert is made on the SQL table. I am some what familiar withthe structure of creating the trigger but here is what I would likehelp with: Selecting the SQL data to transfer, Connecting to VFPdatabase, Insert SQL data into VFP table.CREATE TRIGGER [xyz] ON [dbo].[AAA]FOR INSERT??? Select a,b,c from SQL table??? Connect to VFP Database and Table??? Insert into VFP table Values a,b,cAny information, tips, or even an example Trigger procedure would helpand be greatly appreciated.Thank you,Brett

View 1 Replies View Related

Basic Sql Querying In Visual Web Developer

Jun 1, 2008

I'd like to be able to query a database to get the value of a
certain row.  However, I'd like to save this value into a variable
and use them as I'd like, NOT nessessarily display them in a data
control such as a gridview etc.  I've been able to find a lot of
information on binding datasourses to predefined data controls, but I
can't find anything on simply querying a database for values and using
those values to display a page as I want.My basic end goal is to create what's basically a shopping site like Amazon only for about 100 or so products.Thanks
in advance for any help.  I'm just getting into Visual Web
Developer so please excuse my ignorance and lack of posts.

View 2 Replies View Related

Provider For OleDbMicrosoft OLE DB Provider For Visual FoxPro

Jan 31, 2006

I am using OleDbMicrosoft OLE DB Rpovider for Visual FoxPro for my Data Source Connection and it includes the deleted records from the Visual FoxPro database, how can it have it ignore the deleted records?

HELP!

 

Thanx

Moshe

View 5 Replies View Related

FoxPro Triggers Call FoxPro Stored Proc Calls SQL Server Stored Procedure

Mar 10, 2005

I didn't want to maintain similar/identical tables in a legacy FoxPro system and another system with SQL Server back end. Both systems are active, but some tables are shared.

Initially I was going to use a Linked Server to the FoxPro to pull the FP data when needed. This works. But, I've come up with what I believe is a better solution. Keep in mind that these tables are largely static - occassional changes, edits.

I will do a 1 time DTS from FP into SQL Server tables.

I then create INSERT and UPDATE triggers within FoxPro.

These triggers fire a stored procedure in FoxPro that establishes a connection to the SQL Server and fire the appropriate stored procedure on SQL Server to CREATE and/or UPDATE the corresponding table there.

In the end - the tables are local to both apps.

If the UPDATES or TRIGGERS fail I write to an error log - and in that rare case - I can manually fix. I could set it up to email me from within FoxPro as well if needed.

Here's the FoxPro and SQL Server code for reference for the Record Insert:

FOXPRO employee.dbf InsertTrigger:
employee_insert_trigger(VAL(Employee.ep_pk),Employ ee.fname,Employee.lname,Employee.email,Employee.us er_login,Employee.phone)

FOXPRO corresponding Stored Procedure:
FUNCTION EMPLOYEE_INSERT_TRIGGER
PARAMETERS wepk,wefname,welname,weemail,WEUSERID,WEPHONE

nhandle=SQLCONNECT('SS_PDITHP3','userid','password ')

IF nhandle<0
m.errclose=.f.
IF !USED("errorlog")
USE tisdata!errorlog IN SELECT(1)
m.errclose=.t.
ENDIF

SELECT errorlog
INSERT INTO errorlog (date, time, program,source,user) ;
values (DATE(), TIME(), 'EMPLOYEE_INSERT_TRIGGER','nhandle<0 PARAMS: '+STR(wepk)+wefname+welname+weemail+WEUSERID+WEPHO NE,GETENV("username"))

IF m.errclose
USE IN errorlog
ENDIF
RETURN

ENDIF
nquery="exec ewo_sp_insertNewEmployee @WEPK ="+STR(wepk)+",@WEFNAME ='"+wefname+"',@WELNAME ='"+welname+"',@WEEMAIL ='"+weemail+"',@WEUSERID ='"+weuserid+"',@WEPHONE='"+wephone+"',@RETCODE =0"
nsucc=SQLEXEC(nhandle,nquery)

SQLDISCONNECT(nhandle)

IF nSucc<0
m.errclose=.f.
IF !USED("errorlog")
USE tisdata!errorlog IN SELECT(1)
m.errclose=.t.
ENDIF

SELECT errorlog
INSERT INTO errorlog (date, time, program,source,user) ;
values (DATE(), TIME(), 'EMPLOYEE_INSERT_TRIGGER','nSucc<0 PARAMS: '+STR(wepk)+wefname+welname+weemail+WEUSERID+WEPHO NE,GETENV("username"))

IF m.errclose
USE IN errorlog
ENDIF
ENDIF

RETURN

SQL SERVER Stored Procedure called from FOXPRO Stored Procedure
CREATE procedure ewo_sp_insertNewEmployee (
@WEPK int,
@WEFNAME char(20),
@WELNAME char(20),
@WEEMAIL char(50),
@WEUSERID char(15),
@WEPHONE char(25),
@RETCODE int OUTPUT
)

AS

insert into WO_EMP (
WE_PK,
WE_FNAME,
WE_LNAME,
WE_EMAIL,
WE_USERID,
WE_PHONE
)

VALUES (
@WEPK,
@WEFNAME,
@WELNAME,
@WEEMAIL,
@WEUSERID,
@WEPHONE
)


IF @@ERROR <> 0
BEGIN
SET @RETCODE=@@ERROR
END
ELSE
BEGIN
-- SUCCESS!!
SET @RETCODE=0
END

return @RETCODE
GO

View 2 Replies View Related

FoxPro To MS-SQL ?

Sep 30, 1998

I found toll for migrating FoxPro( 2.6 and 3.0) databases to Oracle but I need one
for FoxPro DB to MS-SQL. Any idea where to find it( if there is any ?)

Thanks

View 1 Replies View Related

FoxPro Vs. SQL

Nov 1, 2006

Hello everyone,My company uses a FoxPro database right now as an interfaceand a database. For our situation, I have come to the conclusion thatit would be a better choice for us to move to an SQL server of somesort. I have been given the task of overseeing the overhaul on theprogram. I am paranoid about security and uptime, and so is the CEO andthere is more and more demand for the company to get on the interactiveinternet. I'd like our clients to be able to submit data to ourdatabase and pull data from it (only certain data of course). My ideais to convert the FP tables to and SQL server and write an internalapplication(or web-based - advantages? I dunno) for the interface. Forthe internet side of things, my idea is to have seperate web database(SQL) that will put information from web clients. Through the internalinterface, internal users would then be able to pull data from the webdatabase to the internal SQL. And through the internet (authenticatedof course), the web users would pull data though the web database, whopulls information from the internal SQL database. Would someone pleasetear this idea apart w/ advantages and disadvantages. Also, if this isthe best route, tell me how I can sell this idea to my boss. What's sogood about using SQL vs. FP over the internet? What about internally?What about security? Cost is going to place a big role on the what theCEO decides, unless I can sell him otherwise. Should I tell him that weshouldn't do it now and save some money to do it right? Or what? Somehelp please. Thanks.Alex

View 12 Replies View Related

DTS - 900 Mb Foxpro .dbf Import

Aug 4, 2000

Any suggestions on the least slowest way to import a large Foxpro table file into SQL Server? I'm looking for ANY suggestions. I'm not sure if I changed a setting, but I get an "out of disk space: can't create file c:emplahblah.xxx " error message when I try to run my standard data pump DTS (with a Fox ODBC datasource to a SQL table, no tranformations, straight copy). Thanks for the help.

Jim

View 4 Replies View Related

Migrating Foxpro

Sep 11, 2007

Hello, all. I need to migrate a visual Foxpro database to SQL server. Is there a way I can import the visual Foxpro data files into Enterprise manager?

Thanks in advance.

View 2 Replies View Related

SQL Server Vs. FoxPro

Oct 25, 2004

Hi,

There is an issue at my company that creates a lot of confusion. Some people blame the slowness of queries on the FoxPro database, so we're considering to migrate to MS SQL Server.

What is the real difference between MS SQL Server and MS FoxPro?

Isn't MS SQL Server supposed to be faster? (It's a high-performance and very mainstream database, where I personally never knew anybody who used FoxPro). Some people claim that FoxPro performs faster in benchmarks. Is it true? If it is, why don't most people use FoxPro?

Also, when buying the database software for the server, which one is more expensive?

I would appreciate any pointers. Thanks.

View 3 Replies View Related

Foxpro Migration

Aug 30, 2007

Hello,

I'm looking to migrate a visual foxpro database to SQL server. Before I map and migrate over to the new system I need to get an understanding of the structure of the old one and cleans the data. Unfortunatley I don't have any of the orginal design documention. Is there a way I can import the visual foxpro data files into Enterprise manager? Or what method would you recommend to first get an understanding of how the database works?

Thanks for any help you can give me.

Andy

View 2 Replies View Related

DTS Foxpro To SQL 2000

Oct 18, 2007

I want to send parameters to a DTS (Foxpro to SQL 2000). I got it figured out with a DTS(Exel to SQL 2000) but i can't find a way to get the thing to work for foxpro.

I want to do this because i have a stored procedure that calls the xp_cmdshell function and then by running the dts and just passing a parameter to it for the old order i want in my new application database...

Please any help would be appreciated......

View 3 Replies View Related

Foxpro Export

Jun 1, 2007

I'm trying to export the data from sql to foxpro dbf file. I can't seem to find the OLE in 2005 any where. Can some one give me the direction how to export and connect to foxpro dbf file from import/export wizard

thanks

View 1 Replies View Related

Insert Into SQL From Foxpro

Jul 20, 2005

I have a recordset in my VB6 app that was created using ODBC and I would like to insert the data into a SQL db table. I already have the target Db & table setup. What is the fastest way to accomplish the data transfer? Can I do a Select into using the ODBC recordset as my source?Thanks

View 1 Replies View Related

Connect To Foxpro V6.0

Jul 16, 2007

Is it possible to connect virtual foxpro v6.0?

View 5 Replies View Related

Sql To FoxPro Export

May 24, 2006

I have 2 packages, one to import data from Foxpro to Sql and another to send the data back from Sql to FoxPro.

The time it takes to execute the package that moves 2 million rows of data from FoxPro to Sql takes about 18 to 25 mins. Not bad. However, moving approximately the same number of rows from Sql back to FoxPro takes about 8 hrs. Not acceptable. I have tried several things with no luck.

Any advice would be appreciated.

V

View 3 Replies View Related

Linked Server To FoxPro

Nov 5, 2004

Hello,

I want to know if there is an way to SET an index when send a query using the OpenQuery function to a FoxPro database using a linked server in the MS-SQL that points to a System DSN with the MS ODBC Driver to FoxPro.

Thank you in advance,

Aldair.

View 5 Replies View Related

Foxpro To Sqlserver Migration

Mar 7, 2004

I have to migrate Foxpro database ( DOS and windows versions) to SQLserver. Could you please someone write me, any measures that i would need to consider in migration?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved