From webmaster@hollysugar.com Wed Apr 9 16:02:08 2003 X-Original-To: pgsql-odbc@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 20314476340 for ; Wed, 9 Apr 2003 12:02:08 -0400 (EDT) Received: from m1-cluster1.vcn.com (m1-cluster1.vcn.com [209.193.72.31]) by postgresql.org (Postfix) with ESMTP id 84013476342 for ; Wed, 9 Apr 2003 12:02:06 -0400 (EDT) Received: from sweetbeet2k (unverified [209.193.70.230]) by m1-cluster1.vcn.com (Vircom SMTPRS 5.3.232) with ESMTP id ; Wed, 9 Apr 2003 10:02:11 -0600 Message-ID: <002f01c2feb1$618be5e0$a1d2a8c0@impsu.net> From: "Hollysugar Webmaster" To: "Dave Page" Cc: References: <03AF4E498C591348A42FC93DEA9661B8861B@mail.vale-housing.co.uk> Subject: Re: problems with sqlsetpos -->having odbc intercept alter command Date: Wed, 9 Apr 2003 10:02:07 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002C_01C2FE7F.149891C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=-6.2 required=5.0 tests=BAYES_30,HTML_20_30,HTML_FONT_COLOR_BLUE, HTML_FONT_COLOR_RED,HTML_FONT_COLOR_UNSAFE,REFERENCES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/21 X-Sequence-Number: 2823 This is a multi-part message in MIME format. ------=_NextPart_000_002C_01C2FE7F.149891C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MessageDave, For the moment we have given up on syncing the SyWare product with PostgreS= ql. We are now shifting our focus to using Microsoft's active sync as a met= hod of syncing to the PostgreSql database. Either of these methods will all= ow us to communicate and sync with the GIS application we have running on t= he PDA. With the active sync connection we are also running into a problem. Active = sync is sending the command " Alter table "MSysCeCmobile2" add "ConflictID"= integer IDENTITY" which then results in a parse error. I have written the = equivalent alter table/column commands setting the column to a serial but I= do not know how to intercept the original alter command with my group of c= ommands? I tried to create a function which I was going to invoke with a rule but se= tting the default value for the sequence caused an error in the function 'E= RROR: Attribute "conflict_id_id" not found'. conflict_id_id is the name of = the sequence I created. This is the line of code I used: ' ALTER TABLE "MSysCeCmobile2" ALTER "ConflictID" SET DEFAULT nextval("con= flict_id_id");'=20 When I used single quotes within the nextval function I would get a parse e= rror. Even if I were to get this function to work correctly it does not appear th= at PostgreSql has support for a rule on ALTER. Which leads me back to inter= cepting the ALTER command with the ODBC driver and replacing it with my own= ALTER commands. I'm sorry to be such a bother, but hopefully once we get this worked out, i= t will be useful to other people who would like to sync a mobile applicatio= n with PostgreSql. Julie ------=_NextPart_000_002C_01C2FE7F.149891C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message
Dave,
 
For the moment we have given up on syncing= the=20 SyWare product with PostgreSql. We are now shifting our focus to using=20 Microsoft's active sync as a method of syncing to the PostgreSql database.= =20 Either of these methods will allow us to communicate and sync with the GIS= =20 application we have running on the PDA.
 
With the active sync connection we are als= o running=20 into a problem. Active sync is sending the command " Alter table=20 "MSysCeCmobile2" add "ConflictID" integer IDENTITY" which then results in a= =20 parse error. I have written the equivalent alter table/column commands sett= ing=20 the column to a serial but I do not know how to intercept the original alte= r=20 command with my group of commands?
 
I tried to create a function which I was g= oing to=20 invoke with a rule but setting the default value for the sequence caus= ed an=20 error in the function 'ERROR: Attribute "conflict_id_id" not found'.=20 conflict_id_id is the name of the sequence I created. This is the line of c= ode I=20 used:
 
 ' ALTER TABLE "MSysCeCmob= ile2"=20 ALTER "ConflictID" SET=20 DEFAULT nextval("conflict_id_id");'
 
When I used single quotes within the nextv= al=20 function I would get a parse error.
 
Even if I were to get this function to wor= k=20 correctly it does not appear that PostgreSql has support for a rule on ALTE= R.=20 Which leads me back to intercepting the ALTER command with the ODBC driver = and=20 replacing it with my own ALTER commands.
 
I'm sorry to be such a bother, but hopeful= ly once=20 we get this worked out, it will be useful to other people who would like to= sync=20 a mobile application with PostgreSql.
 
Julie
------=_NextPart_000_002C_01C2FE7F.149891C0-- From dpage@vale-housing.co.uk Wed Apr 9 16:25:19 2003 X-Original-To: pgsql-odbc@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A57CD476351 for ; Wed, 9 Apr 2003 12:25:19 -0400 (EDT) Received: from salem.vale-housing.co.uk (mailgate.vale-housing.co.uk [80.176.1.146]) by postgresql.org (Postfix) with ESMTP id 7481447636B for ; Wed, 9 Apr 2003 12:25:17 -0400 (EDT) Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2FEB4.9E8E0376" Subject: Re: problems with sqlsetpos -->having odbc intercept alter command X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Wed, 9 Apr 2003 17:25:22 +0100 Message-ID: <03AF4E498C591348A42FC93DEA9661B8259F40@mail.vale-housing.co.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ODBC] problems with sqlsetpos -->having odbc intercept alter command thread-index: AcL+sWKUUy8hhuWjQum4jUw9d4l6FwAAo2kw From: "Dave Page" To: "Hollysugar Webmaster" Cc: X-Spam-Status: No, hits=-2.1 required=5.0 tests=BAYES_20,HTML_30_40,HTML_FONT_COLOR_BLUE, HTML_FONT_COLOR_RED,HTML_FONT_COLOR_UNSAFE version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/24 X-Sequence-Number: 2826 This is a multi-part message in MIME format. ------_=_NextPart_001_01C2FEB4.9E8E0376 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable =20 -----Original Message----- From: Hollysugar Webmaster [mailto:webmaster@hollysugar.com]=20 Sent: 09 April 2003 17:02 To: Dave Page Cc: pgsql-odbc@postgresql.org Subject: Re: [ODBC] problems with sqlsetpos -->having odbc intercept alter command =09 =09 Dave, =09=20 For the moment we have given up on syncing the SyWare product with PostgreSql. We are now shifting our focus to using Microsoft's active sync as a method of syncing to the PostgreSql database. Either of these methods will allow us to communicate and sync with the GIS application we have running on the PDA. =09=20 With the active sync connection we are also running into a problem. Active sync is sending the command " Alter table "MSysCeCmobile2" add "ConflictID" integer IDENTITY" which then results in a parse error. I have written the equivalent alter table/column commands setting the column to a serial but I do not know how to intercept the original alter command with my group of commands?=20 =09=20 If that's what Activesync sends, then I don't see how you can intercept it short of hacking the driver or the PostgreSQL parser.=20 =09=20 I tried to create a function which I was going to invoke with a rule but setting the default value for the sequence caused an error in the function 'ERROR: Attribute "conflict_id_id" not found'. conflict_id_id is the name of the sequence I created. This is the line of code I used: =09=20 ' ALTER TABLE "MSysCeCmobile2" ALTER "ConflictID" SET DEFAULT nextval("conflict_id_id");'=20 =09=20 When I used single quotes within the nextval function I would get a parse error.=20 =09=20 Try doing it in pgAdmin with SQL logging turned on and see what it does. It's almost certainly single quotes though.=20 =09=20 Even if I were to get this function to work correctly it does not appear that PostgreSql has support for a rule on ALTER. Which leads me back to intercepting the ALTER command with the ODBC driver and replacing it with my own ALTER commands.=20 =09=20 No, there is no support for rules on ALTER that I'm aware of. If I get time tomorrow I'll look at activesync (no promises). We have about 20 pocket PCs in the field running a PostgreSQL based application. The only difference here is that the data is downloaded and prepared in a local Access database which is then transferred to the ppc.=20 =20 Regards, Dave. ------_=_NextPart_001_01C2FEB4.9E8E0376 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Message
 
-----Original Message-----
From: Hollysu= gar=20 Webmaster [mailto:webmaster@hollysugar.com]
Sent: 09 April 200= 3=20 17:02
To: Dave Page
Cc:=20 pgsql-odbc@postgresql.org
Subject: Re: [ODBC] problems with=20 sqlsetpos -->having odbc intercept alter command

Dave,
 
For the moment we have given up on synci= ng the=20 SyWare product with PostgreSql. We are now shifting our focus to using=20 Microsoft's active sync as a method of syncing to the PostgreSql database= .=20 Either of these methods will allow us to communicate and sync with the GI= S=20 application we have running on the PDA.
 
With the active sync connection we= are also=20 running into a problem. Active sync is sending the command " Alter t= able=20 "MSysCeCmobile2" add "ConflictID" integer IDENTITY" which then results in= a=20 parse error. I have written the equivalent alter table/column commands se= tting=20 the column to a serial but I do not know how to intercept the original al= ter=20 command with my group of commands? 
 
If that's what Activesync sends, then I don't see how you c= an=20 intercept it short of hacking the driver or the PostgreSQL=20 parser. 
 
I tried to create a function which I was= going to=20 invoke with a rule but setting the default value for the sequence ca= used=20 an error in the function 'ERROR: Attribute "conflict_id_id" not found'.= =20 conflict_id_id is the name of the sequence I created. This is the line of= code=20 I used:
 
 ' <= FONT=20 size=3D2>ALTER TABLE "MSysCeCm= obile2"=20 ALTER "ConflictID" SET= =20 DEFAULT nextval("conflict_id_id");'
 
When I used single quotes within t= he=20 nextval function I would get a parse error. 
 
Try doing it in pgAdmin with SQL logging turned on and see = what it=20 does. It's almost certainly single quotes=20 though. 
 
Even if I were to get this functio= n to work=20 correctly it does not appear that PostgreSql has support for a rule on AL= TER.=20 Which leads me back to intercepting the ALTER command with the ODBC drive= r and=20 replacing it with my own ALTER commands.=  
 
No, there is no support for rules on ALTER that I'm aware o= f. If I=20 get time tomorrow I'll look at activesync (no promises). We have about 20 p= ocket=20 PCs in the field running a PostgreSQL based application. The only=20 difference here is that the data is downloaded and prepared in a local Acce= ss=20 database which is then transferred to the=20 ppc. 
 
Regards, Dave.
= =00 ------_=_NextPart_001_01C2FEB4.9E8E0376--