General discussion

Locked

Anyone know anything about the old Foxpro??

By ObiWayneKenobi ·
I've been wracking my brain for like the past three days with this problem... I am trying to insert data into a Foxpro for Windows 2.6 DBF that has logical fields from an ASP page.

In my SQL Insert query I've tried 1, 0, .T., .F., True, False and a whole slew of other things to get this field to update, and every time I get a "Data Type Mismatch" error. What's the proper value to update it?? I also notice that it flags a syntax error if I try to do something like this:

INSERT INTO table_name(field_name) VALUES(value).. is it not possible under Foxpro 2.6 to specify certain fields to update?? I know my way around SQL, but using this dinosaur is something else entirely.

I'd appreciate any help with this problem.. it's driving me crazy!

EDIT: It appears that the logical field might not be the problem.. it might be a Date field, but again whats the way to insert this? the format mm/dd/yyyy gives a type mismatch error as well.

This conversation is currently closed to new comments.

12 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

That error sounds like you are trying to

by Deadly Ernest In reply to Anyone know anything abou ...

input the data in the wrong format - ie text instead of numeric value or vica versa. That is the usual cause of the 'Data Type Mismatch' error.

Check the databass itself as to what it is looking for. It could be it is looking for the data as something like 23-Mar-2006 or 23-Mar-06 or 03-23-2006 or just 03 23 2006 and not 13/23/2006. The error may be the input field break up signals should be a space or a "/" or a ",".

Collapse -

data mismatch or try this

by ranich In reply to That error sounds like yo ...

If you can't get the data type to work, export the dbase into excel. export your asp data into excel, and merge them accordingly on whatever matches them up and resave the dbase as a foxpro file.

Collapse -

Got it...

by ObiWayneKenobi In reply to Anyone know anything abou ...

Apparantly, Foxpro requires dates to be contained within braces {}. Foxpro is a tricky beast. What I wouldn't give to upgrade it to SQL Server 2005...

Collapse -

Another problem with this thing...

by ObiWayneKenobi In reply to Anyone know anything abou ...

When I try to do an UPDATE or a DELETE sql command it throws "Feature not available." (when I do it on the ASP page I'm writing it does nothing, but won't save the data). Do I need to set some kind of permissions or something to be able to update or delete records from it?

Collapse -

AHH Foxpro the good ole days. I used to program in it

by radiic In reply to Another problem with this ...

One thing to remember is that when you do an UPDATE or DELETE or PACK on the database you have to have exclusive use of the database. In fox you have to specify upon opeing that database to open it with exclusive use.

Wow i am still wondering why your using foxpro 2.6 why not upgrade the machine to at least visual foxpro that way you would have better tools to work with. And if you think 2.6 is bad and buggy, you should have tried working with foxbase and foxplus, the earlier versions, and of course they are Micro$oft products, they wouldnt be M$ products if they didnt have bugs in them :)

Collapse -

Not my choice...

by ObiWayneKenobi In reply to AHH Foxpro the good ole d ...

The co. I work for has their entire business in Foxpro 2.6 (along with NT 4.5 Small Business Server and a truckload of Win95/98 machines). Every piece of data we use or enter is done through it; it was set up that way years ago and was "really a great solution back then" but management has never seen any reason to ever upgrade it. So I am stuck supporting it for any and all development.

Collapse -

Understood....But do they>?

by radiic In reply to Not my choice...

WoW...sounds like they are the type that just dont want to change anything. I mean the ol saying "If it ain't broke, don't fix it" doesnt really work these days. They do know that M$ does not support 4.5 anymore so if you have a wicked crash on one of your servers and try to call to get help they will laugh at you. Anyways i know that is not your battle to fight.

Well did exclusive help you. After i posted i starting thinking of the code i use to write. Let me know how you are doing these SQL inserts, because i am trying to think back....Years lets see probably 8 years ago...and i dont remember the tables supporting SQL insertion. Maybe they do and we just never did it.

Well i do feel for ya having to support it.

Collapse -

I figured it out...

by ObiWayneKenobi In reply to Understood....But do they ...

I dont know what I did.. the UPDATE doesnt work from Foxpro itself but it works from the ASP code.

And you're right on the money with the old saying. Sums it up pretty well. But.. I need the job (was out of work for almost 6 months before) so.. thanks for the advice.. and the condolences :)

Collapse -

Dates in FoxPro

by pjalexander In reply to Anyone know anything abou ...

The format for dates in FoxPro is {06/13/2006} or {^2006/06/13}, depending on how FoxPro is set up. At least in VFP 5.0, which is the oldest version I use.

Sorry, I haven't figured out how to query a logical field.

Collapse -

foxpro 2.6 to mysql

by bm_keshav In reply to Anyone know anything abou ...

YOU CAN TRANSFER YOUR FOXPRO DBF FILE INTO MYSQL TABLE. FIRST OF ALL EXPORT YOUR DBF INTO CSV FILE AND THEN INSERT YOUR CSV INTO MYSQL.

BMK

Back to Software Forum
12 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums