insert and update in vb.net
am 19.12.2005 13:45:28 von Freeking Wu
------=_Part_2839_24057979.1134996328237
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
hi, I want to operate the postgres database via vb.net. I download the
postgres server 8.1 and the latest pgsql-odbc drviers. But question comes.
I can select data from db correctly . But when I insert or update the data,
no error or exception occurs. but the db takes no effect. I test the odbc
driver with access 2002 and I can update or insert data. I changed several
parameters with the connection string .But it doesn't work .How can I do?
following is my main code.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim strConn As String
strConn =3D "DRIVER=3DPostgreSQL
ANSI;SERVER=3Dlocalhost;PORT=3D5432;UID=3Dpostgres;Password= 3Dpostgres;DATA=
BASE=3Dtest;pwd=3Dpostgres;ReadOnly=3D0"
'strConn =3D "DRIVER=3D{PostgreSQL
ANSI};UID=3Dpostgres;pwd=3Dpostgres;LowerCaseIdentifier=3D0; UseServerSidePr=
epare=3D0;ByteaAsLongVarBinary=3D0;"
_
& "Protocol=3D6.4;" _
& "ReadOnly=3D1;" _
& "SSLMODE=3Ddisable;" _
& "PORT=3D5432;" _
& "SERVER=3Dlocalhost;" _
& "DATABASE=3Dtest;"
'strConn =3D "dsn=3Dtest;uid=3Dpostgres;pwd=3Dpostgres"
Dim cnDb As OdbcConnection
Dim dsDB As New DataSet
Dim adDb As OdbcDataAdapter
Dim cbDb As OdbcCommandBuilder
Dim cmd As OdbcCommand
Dim cmdIns As OdbcCommand
Try
cnDb =3D New OdbcConnection(strConn)
cnDb.Open()
dsDB =3D New DataSet
adDb =3D New OdbcDataAdapter
cbDb =3D New OdbcCommandBuilder(adDb)
' Create the SelectCommand.
cmd =3D New OdbcCommand("SELECT * FROM test ", cnDb) ' & _
'"WHERE id =3D ? ", cnDb)
'cmd.Parameters.Add("@id", OdbcType.NVarChar, "1")
adDb.SelectCommand =3D cmd
'adDb.UpdateCommand =3D New OdbcCommand(strConn, cnDb)
cmd =3D New OdbcCommand("UPDATE test SET name =3D ? " & _
"WHERE id =3D ?", cnDb)
cmd.Parameters.Add("@name", OdbcType.NChar, 50, "test444")
cmd.Parameters.Add("@id", OdbcType.Int, 8, 4)
adDb.UpdateCommand =3D cmd
cmdIns =3D New OdbcCommand("INSERT INTO test values(100,'100')"=
,
cnDb)
adDb.InsertCommand =3D cmdIns
adDb.Fill(dsDB)
adDb.Update(dsDB)
cnDb.Close()
Finally
If Not cnDb Is Nothing Then cnDb.Dispose()
End Try
End Sub
------=_Part_2839_24057979.1134996328237
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
hi, I want to operate the postgres database via
et">vb.net. I download the postgres server 8.1 and the latest pgs=
ql-odbc drviers. But question comes. I can select data from db correctly . =
But when I insert or update the data, no error or exception occurs. bu=
t the db takes no effect. I test the odbc driver with access 2002 and I can=
update or insert data. I changed several parameters with the connection st=
ring .But it doesn't work .How can I do?
following is my main code.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e A=
s System.EventArgs) Handles Button1.Click
=
Dim strConn As String
&=
nbsp; strConn =3D "DRIVER=3DPostgreSQL ANSI;SERVER=3Dlocalhost;PORT=3D=
5432;UID=3Dpostgres;Password=3Dpostgres;DATABASE=3Dtest;pwd= 3Dpostgres;Read=
Only=3D0"
'strConn =3D "DRIVER=3D=
{PostgreSQL ANSI};UID=3Dpostgres;pwd=3Dpostgres;LowerCaseIdentifier=3D0; Use=
ServerSidePrepare=3D0;ByteaAsLongVarBinary=3D0;" _
&nbs=
p; & "Protocol=3D6.4;" _
&nb=
sp; & "ReadOnly=3D1;" _
& "SSLMODE=3Ddisabl=
e;" _
& "PORT=
=3D5432;" _
& "=
SERVER=3Dlocalhost;" _
&=
amp; "DATABASE=3Dtest;"
&n=
bsp; 'strConn =3D "dsn=3Dtest;uid=3Dpostgres;pwd=3Dpostgres"
Dim cnDb As OdbcConnection
> Dim dsDB As New DataSet
&nbs=
p; Dim adDb As OdbcDataAdapter
 =
; Dim cbDb As OdbcCommandBuilder
&nb=
sp; Dim cmd As OdbcCommand
&nb=
sp; Dim cmdIns As OdbcCommand
Try
&nbs=
p; cnDb =3D New OdbcConnection(st=
rConn)
 =
; cnDb.Open()
&nbs=
p; dsDB =3D New DataSet
=
adDb =3D New OdbcDataAdapter
=
cbDb =3D New OdbcCommandBu=
ilder(adDb)
' Cre=
ate the SelectCommand.
cmd =
=3D New OdbcCommand("SELECT * FROM test ", cnDb) ' & _
&nb=
sp; '"WHER=
E id =3D ? ", cnDb)
'cmd.=
Parameters.Add("@id", OdbcType.NVarChar, "1")
adDb.=
SelectCommand =3D cmd
'adDb=
..UpdateCommand =3D New OdbcCommand(strConn, cnDb)
&nbs=
p; cmd =3D New OdbcCommand("=
UPDATE test SET name =3D ? " & _
=
&nb=
sp; =
"WHERE id =3D ?", cnDb)
cmd.P=
arameters.Add("@name", OdbcType.NChar, 50, "test444")
r> cmd.Pa=
rameters.Add("@id", OdbcType.Int, 8, 4)
adDb.=
UpdateCommand =3D cmd
cmdIn=
s =3D New OdbcCommand("INSERT INTO test values(100,'100')", cnDb)=
adDb=
..InsertCommand =3D cmdIns
adDb.=
Fill(dsDB)
&=
nbsp; adDb.Update(dsDB)
=
cnDb.Close()
Finally
=
If Not cnDb Is Nothing The=
n cnDb.Dispose()
End Try
&=
nbsp; End Sub
------=_Part_2839_24057979.1134996328237--
Re: insert and update in vb.net
am 19.12.2005 14:30:39 von Freeking Wu
------=_Part_3051_20763416.1134999039933
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
pgsql odbc driver is 8.01.02 . following is the log file. thank you very
much
[2032]globals.extra_systable_prefixes =3D 'dd_;'
[2032][[SQLAllocHandle]][2032]**** in PGAPI_AllocEnv **
[2032]** exit PGAPI_AllocEnv: phenv =3D 94773136 **
[2032][[SQLSetEnvAttr]] att=3D200,3
[2032][[SQLAllocHandle]][2032]PGAPI_AllocConnect: entering...
[2032]**** PGAPI_AllocConnect: henv =3D 94773136, conn =3D 94779272
[2032]EN_add_connection: self =3D 94773136, conn =3D 94779272
[2032] added at i =3D0, conn->henv =3D 94773136, conns[i]->henv =3D 9=
4773136
[2032][SQLGetInfo(30)][2032]PGAPI_GetInfo: entering...fInfoType=3D77
[2032]PGAPI_GetInfo: p=3D'03.00', len=3D5, value=3D0, cbMax=3D12
[2032][[SQLSetConnectAttr]] 103
[2032]PGAPI_SetConnectAttr 103
[2032]PGAPI_SetConnectOption: entering fOption =3D 103 vParam =3D 15
[2032][SQLDriverConnect][2032]PGAPI_DriverConnect: entering...
[2032]**** PGAPI_DriverConnect: fDriverCompletion=3D0,
connStrIn=3D'DSN=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]our_connect_string =3D 'DSN=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]attribute =3D 'DSN', value =3D 'test'
[2032]copyAttributes:
DSN=3D'test',server=3D'',dbase=3D'',user=3D'',passwd=3D'xxxx x',port=3D'',ss=
lmode=3D'',onlyread=3D'',protocol=3D'',conn_settings=3D'',di sallow_prematur=
e=3D-1)
[2032]attribute =3D 'UID', value =3D 'postgres'
[2032]copyAttributes:
DSN=3D'test',server=3D'',dbase=3D'',user=3D'postgres',passwd =3D'xxxxx',port=
=3D'',sslmode=3D'',onlyread=3D'',protocol=3D'',conn_settings =3D'',disallow_=
premature=3D-1)
[2032]attribute =3D 'PWD', value =3D 'xxxxx'
[2032]copyAttributes:
DSN=3D'test',server=3D'',dbase=3D'',user=3D'postgres',passwd =3D'xxxxx',port=
=3D'',sslmode=3D'',onlyread=3D'',protocol=3D'',conn_settings =3D'',disallow_=
premature=3D-1)
[2032]globals.extra_systable_prefixes =3D 'dd_;'
[2032]globals.extra_systable_prefixes =3D 'dd_;'
[2032]our_connect_string =3D 'DSN=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]attribute =3D 'DSN', value =3D 'test'
[2032]CopyCommonAttributes:
A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B 4=3D1;B5=3D1;B6=
=3D0;B7=3D1;B8=3D0;B9=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[2032]attri bute
=3D 'UID', value =3D 'postgres'
[2032]CopyCommonAttributes:
A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B 4=3D1;B5=3D1;B6=
=3D0;B7=3D1;B8=3D0;B9=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[2032]attri bute
=3D 'PWD', value =3D 'xxxxx'
[2032]CopyCommonAttributes:
A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B 4=3D1;B5=3D1;B6=
=3D0;B7=3D1;B8=3D0;B9=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[2032]PGAPI _Disconnect:
about to CC_cleanup
[2032]in CC_Cleanup, self=3D94779272
[2032]after CC_abort
[2032]entering PGCONN_Destructor
[2032]exiting PGCONN_Destructor
[2032]after LIBPQ destructor
[2032]exit CC_Cleanup
[2032]PGAPI_Disconnect: done CC_cleanup
[2032]PGAPI_Disconnect: returning...
[2032][[SQLFreeHandle]][2032]PGAPI_FreeConnect: entering...
[2032]**** in PGAPI_FreeConnect: hdbc=3D94779272
[2032]enter CC_Destructor, self=3D94779272
[2032]in CC_Cleanup, self=3D94779272
[2032]after LIBPQ destructor
[2032]exit CC_Cleanup
[2032]after CC_Cleanup
[2032]after free statement holders
[2032]exit CC_Destructor
[2032]PGAPI_FreeConnect: returning...
[2032][[SQLFreeHandle]][2032]**** in PGAPI_FreeEnv: env =3D 94773136 **
[2032]in EN_Destructor, self=3D94773136
[2032]exit EN_Destructor: rv =3D 1
[2032] ok
[2032][[SQLAllocHandle]][2032]**** in PGAPI_AllocEnv **
[2032]** exit PGAPI_AllocEnv: phenv =3D 94773136 **
[2032][[SQLSetEnvAttr]] att=3D200,3
[2032][[SQLAllocHandle]][2032]PGAPI_AllocConnect: entering...
[2032]**** PGAPI_AllocConnect: henv =3D 94773136, conn =3D 94779272
[2032]EN_add_connection: self =3D 94773136, conn =3D 94779272
[2032] added at i =3D0, conn->henv =3D 94773136, conns[i]->henv =3D 9=
4773136
[2032][SQLGetInfo(30)][2032]PGAPI_GetInfo: entering...fInfoType=3D77
[2032]PGAPI_GetInfo: p=3D'03.00', len=3D5, value=3D0, cbMax=3D12
[2032][[SQLSetConnectAttr]] 103
[2032]PGAPI_SetConnectAttr 103
[2032]PGAPI_SetConnectOption: entering fOption =3D 103 vParam =3D 15
[2032][SQLDriverConnect][2032]PGAPI_DriverConnect: entering...
[2032]**** PGAPI_DriverConnect: fDriverCompletion=3D0,
connStrIn=3D'DSN=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]our_connect_string =3D 'DSN=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]attribute =3D 'DSN', value =3D 'test'
[2032]copyAttributes:
DSN=3D'test',server=3D'',dbase=3D'',user=3D'',passwd=3D'xxxx x',port=3D'',ss=
lmode=3D'',onlyread=3D'',protocol=3D'',conn_settings=3D'',di sallow_prematur=
e=3D-1)
[2032]attribute =3D 'UID', value =3D 'postgres'
[2032]copyAttributes:
DSN=3D'test',server=3D'',dbase=3D'',user=3D'postgres',passwd =3D'xxxxx',port=
=3D'',sslmode=3D'',onlyread=3D'',protocol=3D'',conn_settings =3D'',disallow_=
premature=3D-1)
[2032]attribute =3D 'PWD', value =3D 'xxxxx'
[2032]copyAttributes:
DSN=3D'test',server=3D'',dbase=3D'',user=3D'postgres',passwd =3D'xxxxx',port=
=3D'',sslmode=3D'',onlyread=3D'',protocol=3D'',conn_settings =3D'',disallow_=
premature=3D-1)
[2032]globals.extra_systable_prefixes =3D 'dd_;'
[2032]globals.extra_systable_prefixes =3D 'dd_;'
[2032]our_connect_string =3D 'DSN=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]attribute =3D 'DSN', value =3D 'test'
[2032]CopyCommonAttributes:
A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B 4=3D1;B5=3D1;B6=
=3D0;B7=3D1;B8=3D0;B9=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[2032]attri bute
=3D 'UID', value =3D 'postgres'
[2032]CopyCommonAttributes:
A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B 4=3D1;B5=3D1;B6=
=3D0;B7=3D1;B8=3D0;B9=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[2032]attri bute
=3D 'PWD', value =3D 'xxxxx'
[2032]CopyCommonAttributes:
A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B 4=3D1;B5=3D1;B6=
=3D0;B7=3D1;B8=3D0;B9=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[2032]PGAPI _Disconnect:
about to CC_cleanup
[2032]in CC_Cleanup, self=3D94779272
[2032]after CC_abort
[2032]entering PGCONN_Destructor
[2032]exiting PGCONN_Destructor
[2032]after LIBPQ destructor
[2032]exit CC_Cleanup
[2032]PGAPI_Disconnect: done CC_cleanup
[2032]PGAPI_Disconnect: returning...
[2032][[SQLFreeHandle]][2032]PGAPI_FreeConnect: entering...
[2032]**** in PGAPI_FreeConnect: hdbc=3D94779272
[2032]enter CC_Destructor, self=3D94779272
[2032]in CC_Cleanup, self=3D94779272
[2032]after LIBPQ destructor
[2032]exit CC_Cleanup
[2032]after CC_Cleanup
[2032]after free statement holders
[2032]exit CC_Destructor
[2032]PGAPI_FreeConnect: returning...
[2032][[SQLFreeHandle]][2032]**** in PGAPI_FreeEnv: env =3D 94773136 **
[2032]in EN_Destructor, self=3D94773136
[2032]exit EN_Destructor: rv =3D 1
[2032] ok
On 12/19/05, Ludek Finstrle wrote:
>
> > hi, I want to operate the postgres database via vb.net. I download the
> > postgres server 8.1 and the latest pgsql-odbc drviers. But question
> comes.
>
> What version do you mean with "latest pgsql-odbc drviers"?
>
> > I can select data from db correctly . But when I insert or update the
> data,
> > no error or exception occurs. but the db takes no effect. I test the
> odbc
> > driver with access 2002 and I can update or insert data. I changed
> several
> > parameters with the connection string .But it doesn't work .How can I
> do?
>
> Could you post mylog output? I want check if problem isn't in ODBC driver=
..
>
> Thanks,
>
> Luf
>
------=_Part_3051_20763416.1134999039933
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
pgsql odbc driver is 8.01.02 . following is the log file. thank you ve=
ry much
[2032]globals.extra_systable_prefixes =3D 'dd_;'
[2032][[SQLAllocHa=
ndle]][2032]**** in PGAPI_AllocEnv **
[2032]** exit PGAPI_AllocEnv: phe=
nv =3D 94773136 **
[2032][[SQLSetEnvAttr]] att=3D200,3
[2032][[SQLAll=
ocHandle]][2032]PGAPI_AllocConnect: entering...
[2032]**** PGAPI_AllocConnect: henv =3D 94773136, conn =3D 94779272
=
[2032]EN_add_connection: self =3D 94773136, conn =3D 94779272
[2032]&nbs=
p; added at i =3D0, conn->henv =3D 9477313=
6, conns[i]->henv =3D 94773136
[2032][SQLGetInfo(30)][2032]PGAPI_GetI=
nfo: entering...fInfoType=3D77
[2032]PGAPI_GetInfo: p=3D'03.00', len=3D5, value=3D0, cbMax=3D12
[20=
32][[SQLSetConnectAttr]] 103
[2032]PGAPI_SetConnectAttr 103
[2032]PGA=
PI_SetConnectOption: entering fOption =3D 103 vParam =3D 15
[2032][SQLDr=
iverConnect][2032]PGAPI_DriverConnect: entering...
[2032]**** PGAPI_DriverConnect: fDriverCompletion=3D0, connStrIn=3D'DSN=
=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]our_connect_string =3D 'DS=
N=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]attribute =3D 'DSN', valu=
e =3D 'test'
[2032]copyAttributes: DSN=3D'test',server=3D'',dbase=3D'',u=
ser=3D'',passwd=3D'xxxxx',port=3D'',sslmode=3D'',onlyread=3D '',protocol=3D'=
',conn_settings=3D'',disallow_premature=3D-1)
[2032]attribute =3D 'UID', value =3D 'postgres'
[2032]copyAttributes=
: DSN=3D'test',server=3D'',dbase=3D'',user=3D'postgres',passwd =3D'xxxxx',po=
rt=3D'',sslmode=3D'',onlyread=3D'',protocol=3D'',conn_settin gs=3D'',disallo=
w_premature=3D-1)
[2032]attribute =3D 'PWD', value =3D 'xxxxx'
[2032]copyAttributes: DSN=3D'test',server=3D'',dbase=3D'',user=3D'postg=
res',passwd=3D'xxxxx',port=3D'',sslmode=3D'',onlyread=3D'',p rotocol=3D'',co=
nn_settings=3D'',disallow_premature=3D-1)
[2032]globals.extra_systable_p=
refixes =3D 'dd_;'
[2032]globals.extra_systable_prefixes =3D 'dd_;'
[2032]our_connect_strin=
g =3D 'DSN=3Dtest;UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]attribute =3D 'D=
SN', value =3D 'test'
[2032]CopyCommonAttributes: A7=3D100;A8=3D8192;A9=
=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B4=3D1;B5=3D1;B6=3D0;B 7=3D1;B8=3D0;B9=
=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[2032]attribute =3D 'UID', value =3D 'postgres'
[2032]CopyCommonAttributes: A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D819=
0;B2=3D0;B3=3D0;B4=3D1;B5=3D1;B6=3D0;B7=3D1;B8=3D0;B9=3D1;C0 =3D0;C1=3D0;C2=
=3Ddd_;[2032]attribute =3D 'PWD', value =3D 'xxxxx'
[2032]CopyCommonAttr=
ibutes: A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B 4=3D1;B=
5=3D1;B6=3D0;B7=3D1;B8=3D0;B9=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[20 32]PGAPI_Discon=
nect: about to CC_cleanup
[2032]in CC_Cleanup, self=3D94779272
[2032]after CC_abort
[2032]e=
ntering PGCONN_Destructor
[2032]exiting PGCONN_Destructor
[2032]aft=
er LIBPQ destructor
[2032]exit CC_Cleanup
[2032]PGAPI_Disconnect: don=
e CC_cleanup
[2032]PGAPI_Disconnect: returning...
[2032][[SQLFreeHandle]][2032]PG=
API_FreeConnect: entering...
[2032]**** in PGAPI_FreeConnect: hdbc=3D947=
79272
[2032]enter CC_Destructor, self=3D94779272
[2032]in CC_Cleanup,=
self=3D94779272
[2032]after LIBPQ destructor
[2032]exit CC_Cleanup
[2032]after CC=
_Cleanup
[2032]after free statement holders
[2032]exit CC_Destructor<=
br>[2032]PGAPI_FreeConnect: returning...
[2032][[SQLFreeHandle]][2032]**=
** in PGAPI_FreeEnv: env =3D 94773136 **=20
[2032]in EN_Destructor, self=3D94773136
[2032]exit EN_Destructor: rv=
=3D 1
[2032] ok
[2032][[SQLAllocHandle]][2032]**** in PG=
API_AllocEnv **
[2032]** exit PGAPI_AllocEnv: phenv =3D 94773136 **
=
[2032][[SQLSetEnvAttr]] att=3D200,3
[2032][[SQLAllocHandle]][2032]PGAPI_AllocConnect: entering...
[2032]=
**** PGAPI_AllocConnect: henv =3D 94773136, conn =3D 94779272
[2032]EN_a=
dd_connection: self =3D 94773136, conn =3D 94779272
[2032] &n=
bsp; added at i =3D0, conn->henv =3D 94773136, conns[i=
]->henv =3D 94773136
[2032][SQLGetInfo(30)][2032]PGAPI_GetInfo: entering...fInfoType=3D77
>[2032]PGAPI_GetInfo: p=3D'03.00', len=3D5, value=3D0, cbMax=3D12
[2032]=
[[SQLSetConnectAttr]] 103
[2032]PGAPI_SetConnectAttr 103
[2032]PGAPI_=
SetConnectOption: entering fOption =3D 103 vParam =3D 15
[2032][SQLDriverConnect][2032]PGAPI_DriverConnect: entering...
[2032=
]**** PGAPI_DriverConnect: fDriverCompletion=3D0, connStrIn=3D'DSN=3Dtest;U=
ID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]our_connect_string =3D 'DSN=3Dtest;=
UID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]attribute =3D 'DSN', value =3D 'test'
[2032]copyAttributes: DS=
N=3D'test',server=3D'',dbase=3D'',user=3D'',passwd=3D'xxxxx' ,port=3D'',sslm=
ode=3D'',onlyread=3D'',protocol=3D'',conn_settings=3D'',disa llow_premature=
=3D-1)
[2032]attribute =3D 'UID', value =3D 'postgres'
[2032]copyAttributes: DSN=3D'test',server=3D'',dbase=3D'',user=3D'postg=
res',passwd=3D'xxxxx',port=3D'',sslmode=3D'',onlyread=3D'',p rotocol=3D'',co=
nn_settings=3D'',disallow_premature=3D-1)
[2032]attribute =3D 'PWD', val=
ue =3D 'xxxxx'
[2032]copyAttributes: DSN=3D'test',server=3D'',dbase=3D''=
,user=3D'postgres',passwd=3D'xxxxx',port=3D'',sslmode=3D'',o nlyread=3D'',pr=
otocol=3D'',conn_settings=3D'',disallow_premature=3D-1)
[2032]globals.extra_systable_prefixes =3D 'dd_;'
[2032]globals.extra=
_systable_prefixes =3D 'dd_;'
[2032]our_connect_string =3D 'DSN=3Dtest;U=
ID=3Dpostgres;PWD=3Dxxxxxxxx;'
[2032]attribute =3D 'DSN', value =3D 'tes=
t'
[2032]CopyCommonAttributes: A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8=
190;B2=3D0;B3=3D0;B4=3D1;B5=3D1;B6=3D0;B7=3D1;B8=3D0;B9=3D1; C0=3D0;C1=3D0;C=
2=3Ddd_;[2032]attribute =3D 'UID', value =3D 'postgres'
[2032]CopyCommonAttributes: A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D819=
0;B2=3D0;B3=3D0;B4=3D1;B5=3D1;B6=3D0;B7=3D1;B8=3D0;B9=3D1;C0 =3D0;C1=3D0;C2=
=3Ddd_;[2032]attribute =3D 'PWD', value =3D 'xxxxx'
[2032]CopyCommonAttr=
ibutes: A7=3D100;A8=3D8192;A9=3D0;B0=3D254;B1=3D8190;B2=3D0;B3=3D0;B 4=3D1;B=
5=3D1;B6=3D0;B7=3D1;B8=3D0;B9=3D1;C0=3D0;C1=3D0;C2=3Ddd_;[20 32]PGAPI_Discon=
nect: about to CC_cleanup
[2032]in CC_Cleanup, self=3D94779272
[2032]after CC_abort
[2032]e=
ntering PGCONN_Destructor
[2032]exiting PGCONN_Destructor
[2032]aft=
er LIBPQ destructor
[2032]exit CC_Cleanup
[2032]PGAPI_Disconnect: don=
e CC_cleanup
[2032]PGAPI_Disconnect: returning...
[2032][[SQLFreeHandle]][2032]PG=
API_FreeConnect: entering...
[2032]**** in PGAPI_FreeConnect: hdbc=3D947=
79272
[2032]enter CC_Destructor, self=3D94779272
[2032]in CC_Cleanup,=
self=3D94779272
[2032]after LIBPQ destructor
[2032]exit CC_Cleanup
[2032]after CC=
_Cleanup
[2032]after free statement holders
[2032]exit CC_Destructor<=
br>[2032]PGAPI_FreeConnect: returning...
[2032][[SQLFreeHandle]][2032]**=
** in PGAPI_FreeEnv: env =3D 94773136 **=20
[2032]in EN_Destructor, self=3D94773136
[2032]exit EN_Destructor: rv=
=3D 1
[2032] ok
On 12/19/05,
>Ludek Finstrle <luf@pzkagis.cz
>> wrote:
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">> hi, I want to operate the p=
ostgres database via . I download the
r>
> postgres server 8.1 and the latest pgsql-odbc drviers. But =
question comes.
What version do you mean with "latest pgsql-odb=
c drviers"?
> I can select data from db correctly . But when=
I insert or update the data,
> no error or exception occurs. but the db takes no effect. I test t=
he odbc
> driver with access 2002 and I can update or insert data. I =
changed several
> parameters with the connection string .But it doesn=
't work .How can I do?
Could you post mylog output? I want check if problem isn't in ODBC =
driver.
Thanks,
Luf
------=_Part_3051_20763416.1134999039933--