Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread D6 and VS2010 ANSI vs UNICODE
Wed, May 2 2012 1:13 PMPermanent Link

mferan

Hi,

Sorry if this has been covered before...

I am an old hand at D6/D7, fairly new to VS2010.  I am trying to use the same underlying databases with both platforms.  My existing databases are ANSI and have been working well with D6/D7.

Am I correct in saying I am unable to use EDB unicode with D6 and D7?

Am I able to use EDB ANSI with VS2010?

Can someone provide a specific connection string for VS2010 that will allow me to connect to EDB?


Thanks in advance

Mike
Wed, May 2 2012 1:22 PMPermanent Link

mferan

Forgot to mention that this is using EDB Server, not standalone.



Mike
Wed, May 2 2012 5:37 PMPermanent Link

Peter Hodgson

Hi

as far as I understand it unicode is about language support and globalisation.

In ANSI there is a limited number of characters. Unicode extends the number of characters to include Japanese, Greek, Turkish etc. Unicode comprises series of character encoding standards intended to support the characters used by a large number of the world’s languages.

To do that, how the data is stored is changed (dont know how). However to encode each character needs more space as the codes have to be longer to accomodate the very extended character sets.

Basically the data takes up more space. Now, the theory is that with globalisation software will be translated into many more languages hence the need for Unicode. If you are only supporting English and Western European languages ANSI is fine. Personally I am using ANSi for my Cloud app as the data returned is smaller.

D6 band D7 can work equally well with ANSI or UNICODE but presumably as they are not UNICODE could not have captions etc in Greek or Turkish (I stand to be corrected on that). So not much point in having a database backend that supports Turkish etc if the front end cannot be in Turkish.

Think thats it anyway  Smile

Peter
Thu, May 3 2012 9:07 AMPermanent Link

Raul

Team Elevate Team Elevate

Mike,

Tim from Elevate might have to chime in so i suggest you email the
support directly to get a clear answer.

However from what you're describing the issue is cross compatibility
where you might run into problems.

- D6/D7 technically is ANSI only but widestring did exist (just not in
VCL) so you could store non-Ansi strings just fine. However i'm not
seeing the Unicode version on download section at all so not sure if
this is supported.

- .Net provider i'm fairly certain is all Unicode;

- ODBC i believe can use ANSI or Unicode

My suggestion would be to try the combination of Ansi EDB server, ANSI
EDB in D6/D7 and ODBC ANSI driver.

Hopefully somebody else has better answers

Raul


On 5/2/2012 1:13 PM, mferan wrote:
> Hi,
>
> Sorry if this has been covered before...
>
> I am an old hand at D6/D7, fairly new to VS2010.  I am trying to use the same underlying databases with both platforms.  My existing databases are ANSI and have been working well with D6/D7.
>
> Am I correct in saying I am unable to use EDB unicode with D6 and D7?
>
> Am I able to use EDB ANSI with VS2010?
>
> Can someone provide a specific connection string for VS2010 that will allow me to connect to EDB?
>
>
> Thanks in advance
>
> Mike
>
Thu, May 3 2012 1:30 PMPermanent Link

mferan


Raul,Peter:

Thanks for the replies.  While globalization using unicode is something to shoot for, right now I'd be content using either ANSI or unicode.

I am currently able to get ODBC and the .Net provider to connect to the unicode server but not the ansi server.  Vice versa for D6/D7, they connect to the ansi server but not the unicode server.


If anyone has had success either getting D6/D& to connect to the unicode server or ODBC to connect to the ANSI server, please let me know.

Mike
Thu, May 3 2012 2:19 PMPermanent Link

Peter Hodgson

Hi Mike

are you using the correct ODBC driver and server combination?

You must use the unicode driver with the unicode server and vice versa.

I have just downloaded the trial and had no problem connecting to my ANSI server.

Peter
Thu, May 3 2012 3:34 PMPermanent Link

Raul

Team Elevate Team Elevate

As i said the .Net provider is unicode so AFAIK you can't use it with
Ansi server.

However ODBC should work with ANSI but you do ODBC verison - as per
Peter in the other post it works fine for him so i'd suggest you
concentrate on ANSI Server + ODBC ANSI.

Raul

On 5/3/2012 1:30 PM, mferan wrote:
> Raul,Peter:
>
> Thanks for the replies.  While globalization using unicode is something to shoot for, right now I'd be content using either ANSI or unicode.
>
> I am currently able to get ODBC and the .Net provider to connect to the unicode server but not the ansi server.  Vice versa for D6/D7, they connect to the ansi server but not the unicode server.
>
>
> If anyone has had success either getting D6/D&  to connect to the unicode server or ODBC to connect to the ANSI server, please let me know.
>
> Mike
>
Thu, May 3 2012 5:08 PMPermanent Link

Peter Hodgson

Hi Raul

if .Net Provider is Unicode you must use the Un icode Server - I agree.

I dont use .net myself although I spent 7 years as VB programmer until i found the power of Delphi!!!!!!!!!

Peter

Raul wrote:

As i said the .Net provider is unicode so AFAIK you can't use it with
Ansi server.

However ODBC should work with ANSI but you do ODBC verison - as per
Peter in the other post it works fine for him so i'd suggest you
concentrate on ANSI Server + ODBC ANSI.

Raul

On 5/3/2012 1:30 PM, mferan wrote:
> Raul,Peter:
>
> Thanks for the replies.  While globalization using unicode is something to shoot for, right now I'd be content using either ANSI or unicode.
>
> I am currently able to get ODBC and the .Net provider to connect to the unicode server but not the ansi server.  Vice versa for D6/D7, they connect to the ansi server but not the unicode server.
>
>
> If anyone has had success either getting D6/D&  to connect to the unicode server or ODBC to connect to the ANSI server, please let me know.
>
> Mike
>
Fri, May 4 2012 3:44 PMPermanent Link

mferan

Peter and Raul,


Thanks for the replies.  I am unable to connect to the ANSI server using the ANSI ODBC driver inside VS2010.  Connecting to the unicode server using unicode ODBC driver OK.

I have a properly working ANSI server running on my local machine

Here are the steps I used inside VS2010 to attempt connection to the ANSI server:

Under data sources I click icon "add new data source", then select database, then select dataset.  

Under "choose your data connection" section  I select "new connection"

Under "choose data source" I pick "Microsoft ODBC Data Source".  The "data provider" combo box fills with exactly one entry, ".NET Framework Data Provider for ODBC".  I click "continue"

Under "Add Connection", I pick "use connection string" then press "build..."

Under "Select data source", I click "New..."

Under "Create New data Source", I select "ElevateDB 2 ODBC Driver"  (NOT Elevate 2 ODBC Driver (Unicode))

Asks for the name of the file I want to save to.  I choose EDB_ODBC_ANSI.DSN and then the Finish under "create new data source"

After clicking finish, I am prompted through various Elevate DB configuration questions inside a set of dialogs titled "Configure Data Source"  The name I leave as "ODBCDriver", then click next, choose the remote radio button, then click next,  blank out the IP address and change Host Name to "localhost" then click next,  click next on connection parameters,  then enter the user name and password.  

I know the connection is established at this point, because I am shown the three databases maintained by this server, and I select one of my databases.

I just click Next for all of the other configuration questions (locking protocol, row change detection, standard NULL behavior, force flushing).  When I am done, I get a "Session Login" dialog box and enter in my Username and password again.  

Now I am back to the "add connection" dialog, with the connection string built and shown:

Dsn=ODBCDriver;Driver={ElevateDB 2 ODBC Driver};uid=administrator;keeptablesopen=FALSE;flushwrites=FALSE;standardnull=TRUE;detectrowchanges=FALSE;rowlockwait=100;rowlockretries=15;rowlockprotocol=PESSIMISTIC;database=mconstants;compression=0;encrypted=FALSE;timeout=180;pinginterval=60;ping=FALSE;port=12010;host=localhost;type=REMOTE;readonly=FALSE


When I do a "Test Connection" from this dialog box, I get this error message:

ERROR [IM002][Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified


Any ideas on what I'm doing wrong?

Thanks

Mike
Mon, May 7 2012 7:07 AMPermanent Link

Peter Hodgson

Hi Mike
sorry taking so long to get back to you - holiday weekend here.

I'm pretty sure the same thing happened to me when I tried to connect through ADO. Cant check it as its holiday today.

I think you would need to copy the connection string to the ADO control.  I just set up a System ODBC connection in the ODBC Manager and used that, worked fine.

I dont use the whole thing myself as Delphi is my tool of choice, so I use the VCL but I will use the Trial just to connect to ElevateDB with Access through ODBC to use the SQL builder in MSAccess for protyping.

Peter
Page 1 of 2Next Page »
Jump to Page:  1 2
Image