Re: MS SQL Migration - Mailing list pgadmin-hackers

From Dave Page
Subject Re: MS SQL Migration
Date
Msg-id FED2B709E3270E4B903EB0175A49BCB1047405@dogbert.vale-housing.co.uk
Whole thread Raw
List pgadmin-hackers
Hi Artur,

Can you copy your emails to pgadmin-hackers@postgresql.org (or just send
them to that list) in future please.

> -----Original Message-----
> From: futrzak [mailto:futrzak@archie.dhs.org]
> Sent: 11 January 2002 09:22
> To: Dave Page
> Subject: Re: MS SQL Migration
>
> Quoted identifiers are valid only when the QUOTED_IDENTIFIER
> option is set ON. By default, the Microsoft OLE DB Provider
> for SQL Server and SQL Server ODBC driver set
> QUOTED_IDENTIFIER ON when they connect.

Yeah, that was what I thought.

> Better way for MSSQL is using bracketed identifiers []
> instead of quoted.
>
> PgAdmin II use OLE DB driver to connect to MSSQL then this
> quote char will be working corectly.

Using brackets would be a lot more work I suspect. I don't see any reason
why the quotes won't work either, so I'll leave them for now.

> > I do have one question - you hard-coded the size for
> numeric columns -
> is it
> > broken for all providers?
>
> No - it was my mistake or tiredness.
>
> This is correct code for this type:
>
>         ' AM 20020110
>         ' driver don't returns correct values - setting to
> default 18,4
>         If szTemp2 = "numeric" Then
>           szTemp2 = szTemp2 & "(" &
> catLocal.Tables(lstData.List(X)).Columns(newColumnArray(Y)).Pr
ecision & "," & catLocal.Tables(lstData.List(X)).Columns>
(newColumnArray(Y)).NumericScale
> & ")"
>         End If
>
> Please update source.
>
> I found another problem with this - when I choose mapping
> from float to numeric, the numericscale will be 0 and data
> will be truncated to integer part of  a number

Sounds like we need a combination of the 2 bits of code - the above for
migrating real numerics, and your 18,4 default for non-numerics. Any ideas
how we can figure out what to use? I guess we should only expect a scale for
source type = adNumeric.

Any thoughts?

Regards, Dave.

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: MS SQL Migration
Next
From: Dave Page
Date:
Subject: Re: MS SQL Migration