[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

11/03/2009 at 03:30AM PST, ID: 24866686 | Points: 500
[x]
Attachment Details

Cast convert access for boolean and string unlike sql server with delphi

Asked by ISIGest in Microsoft Access Database, Delphi Programming, Delphi Database

Tags: ACCESS CAST CONVER DELPHI BOOLEAN STRING

Hi, I try to use an Access database with Delphi.
When I try to create a particular query qith casting of a specified column with "EMPTY" initial value
in a Delphi DataSet the value is not real.

My query is like this for sample:
"SELECT CBool(False) AS myBoolValue, IIF(myTest1 = myTest2, 'A', IIF(myTest1 = myTest3, 'B', 'C')) AS myStringValue FROM myTable"

The result in Access is Ok but in Delphi the fields detail are ambiguos.
For myBoolValue the field definition is "SmallInt"
For myStringValue the field definition is "WideString" with a 255 lenght.

How I can retrieve a correct value like myBoolValue = TBooleanField and myStringValue = TStringField with length 1?

Thanks to all and sorry for my english.
[+][-]11/03/09 03:58 AM, ID: 25728031

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625