Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing Foxpro Data Part 2
Message
Information générale
Forum:
Visual C++
Catégorie:
Autre
Divers
Thread ID:
00266615
Message ID:
00267814
Vues:
21
You missed it alright. You are correct. There is currently no OLEDB provider for Fox. And when there is one (v7 maybe?), it will certainly be for the VFP format. I'm sure there won't be one for FP 2.6!

>Please tell me I missed the point. My understanding is there is no OLEDB provider for FoxPro Back ends. If there is where can I get it?
>
>I need it, I want it, I deserve it!!!!
>
>Jeff
>
>>>Here again is the code I use to access foxpro 2.6 data from visual interdev:
>>>
>>>< %
>>>datethen=date()-6
>>>datenow=date()
>>>qry = "select * from kdata where k_date >= '" & datethen & " and"
>>>qry = qry & " k_date <= '" & datenow & "'"
>>>
>>>set rs1 = server.createobject("ADODB.Recordset")
>>>open.rs1 qry, "DSN=foxcon"
>>>
>>>while not rs1.eof
>>>response.write rs1.name & " " rs1.k_date
>>>wend
>>>% >
>>>
>>>
>>>I think the mistake is in the field k_date since k_date is a foxpro 2.6 date datatype. I tried using curly braces - it did not work.
>>>
>>>Also, I set the foxcon DSN at the system DSN in ODBC Data Sources in Control Panel. I don't think the problem is here since the query works well when I leave out the k_date condition.
>>>
>>>Can somebody help me fix my code?
>>>
>>>
>>>Ramon Carlos
>>
>>Try this as your while loop:
>>
>>while not rs1.eof
>> response.write rs1("name") & " " & rs1("k_date")
>>wend
>>
>>As well, I would recommend you try to use OLEDB instead of ODBC if possible. We've had problems with ODBC on our IIS server (it would crash for no apparent reason) and we were informed by Microsoft that the ODBC was causing the problems, and that we should move to exclussively ODBC. So much for backward and o-compatible technologies!
>>
>>Hugo
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform