Re: [pgadmin-support] Help for Migration

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Alban Hertroys <haramrae(at)gmail(dot)com>
Cc: Mamatha_Kagathi_Chan(at)DELL(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: [pgadmin-support] Help for Migration
Date: 2011-10-25 02:59:58
Message-ID: 4EA6262E.5000805@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-general

On 25/10/11 03:36, Alban Hertroys wrote:
> On 24 Oct 2011, at 14:24, <Mamatha_Kagathi_Chan(at)DELL(dot)com> wrote:
>
>> Hi ,
>>
>> I have migrated Sql Server 2005 database to PostgreSQL 9.0 . I was also successfully able to connect classic ASP to the migrated database. But when the page reaches a stage where it is accessing a procedure I get the following error.
>>
>> PostgreSQL Native Provider error '80040e14'
>>
>> ERROR: syntax error at or near "' 789500'" LINE 1: EXEC Visadetailinsert ' 789500','No','Select visa','','','Se... ^

What database access driver/method are you using?

PostgreSQL doesn't support 'EXEC' ... you probably want to

SELECT myfunctionname(argument1, argument2);

instead. If you're using ODBC, you should be using the ODBC
procedure-call escape sequence to make it database-agnostic, eg:

{? = CALL procname(?,?)}

See: http://msdn.microsoft.com/en-us/library/ms403294.aspx

The ODBC driver for the database you're using should translate that into
suitable call syntax for your database, eg in PostgreSQL it should produce

SELECT procname(?,?);

and capture the result.

I was initially suspicious that the issue was the whitespace in the
quoted number, but that's not it. You're simply sending a completely
bogus query string, and that's the first point the parser happens to
choke on.

--
Craig Ringer

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Henry Drexler 2011-10-25 20:06:11 Re: Minor bug, keyboard navigation
Previous Message Guillaume Lelarge 2011-10-24 21:20:39 Re: Minor bug, keyboard navigation

Browse pgsql-general by date

  From Date Subject
Next Message sunpeng 2011-10-25 03:00:02 hi, friends. are there any performance tuning materials for postgreSQL recommended?
Previous Message Craig Ringer 2011-10-25 02:51:24 Re: PostGIS in a commercial project