MySQL Version: 3.23.42-max-nt
MyODBC Version:2.50.39
OS Version= Windows 2000 Server


If I change the order of fields in a multi-column primary key table,
I cant update the table with SQLSetPos.
ie: If I declare my table :(Primary key fields's order is the same as in table)
 create table A( name varchar(20) not null, surname varchar(20) not null,  addresss 
varchar(50), constraint pkA primary key(name, surname ))
insert into A(name, surname) values('Bill', 'Gates')
select * from A
It works.
But If I declare primary  key like this
create table A( name varchar(20) not null, surname varchar(20) not null,  addresss 
varchar(50), constraint pkA primary key(surname, name ))
It doesnt work.
It doesnt give any error, but doesnt update any row.
the output is :
SQLSetPos:
        Operation = SQL_UPDATE=2, LockType = SQL_LOCK_NO_CHANGE=0
                                Return: SQL_SUCCESS_WITH_INFO=1
                                stmt:           szSqlState = "01S03", *pfNativeError = 
0, *pcbErrorMsg = 36
                                                                                
szErrorMsg = "[TCX][MyODBC]No rows updated/deleted"
-- 

_______________________________________________
Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free! 
http://www.net2phone.com/cgi-bin/link.cgi?143 



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to