Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access with OLE-DB Provider with ADO in VB
Message
 
 
To
15/07/2002 12:52:51
Fehmi Kiraz
Telekommunikation
Frankfurt, Germany
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00678753
Message ID:
00678761
Views:
13
Hi Fehmi,
Welcome to UT!

The string comparison in foxpro is always case sensitive. Following select
Select * from customer where typ = 'partner'
will return 0 records in VFP or thru ADO if actual value in typ field is 'PARTNER'. If values in typ field is stored always in upper case than you can uppercase only the right side of comparison.
Select * from customer where typ = UPPER('partner')
* If case in typ field is unknown or not guaranted
Select * from customer where UPPER(typ) = ('partner')
BTW, it's considered rude to post the same message in more than one category.

>Hello,
>
>i have a application which is developed with Visual Basic. I can access to a .DBC Database with the OLE-DB Provider from VFP. I use ADO to access. But i have problem with the SQL syntax.
>
>Problem:
>THE SOURCE CODE:
>
>01 myconnectString "Provider=VFPOLEDB.1;Data Source=c:\Folder of the 02 Database .dbc;Password='';Collating Sequence=GENERAL"
>
>
>03 Dim XZ as new ADDÒDB.Recordsets
>
>04 XZ.open "Select * from customer where typ = 'PARTNER'", myconnectstring
>
>With this Syntax allways is ok. I have a recordount of 3 Datasets results and this is the true results and it is ok.
>
>But now my Problem:
>
>when i write
>
>04 XZ.open "Select * from customer where typ = 'partner'", myconnectstring
>
>'partner' is here not in Ucase. I have not recordcounts (0). Not results. But i have 3 Partner entries in the Table of customers.
>
>In Visual Fox Pro 7.0 i have not this Problem. It come the same results when i write 'partner' or 'PARTNER'. But i have this Problem with ado when i acces to the database from Visual Basic.
>
>Why?
>
>It is possible to change the Provider settings.
>
>Can You help me!
>
>Thanks
>
>Fehmi
>
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform