Jump to content
Sign in to follow this  
ToddFrankson

Question about FDQuery

Recommended Posts

I have a Firedac connection to a mysql database.

 

In design time, I connect using the 32 bit connection, Get the fields....  Run in 32 bit....everything is great.

 

Switch to 64bit, setup the 64 bit driver, connect and Boom- The field I pulled in in 32 bit (Comes in as TStringField-due to 32bitness), gives a mismatched type error complaining it should be TWideStringField....

 

How can I have my cake and eat it too?  I can't get the 64 bit fields while connected in 32 bit design time.

 

What am I overlooking??

Share this post


Link to post
9 hours ago, ToddFrankson said:

What am I overlooking??

You are overlooking that a field in a 32 bit can be TStringField on a 64 bit it is TWideStringField. Bitness has nothing to do if a field is ansi or unicode. Your connection during design time and runtime 32/64 have different settings.

 

You can add a mapping rule to a 32 bit connection to convert stringfield to widestringfield to solve your problem. 

Share this post


Link to post
11 hours ago, Lajos Juhász said:

You are overlooking that a field in a 32 bit can be TStringField on a 64 bit it is TWideStringField. Bitness has nothing to do if a field is ansi or unicode. Your connection during design time and runtime 32/64 have different settings.

 

You can add a mapping rule to a 32 bit connection to convert stringfield to widestringfield to solve your problem

Dooouh!

 

I feel like an idiot for having a brain fart!

 

Thanks for the reminder!!!!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×