Please I need help with this :(

 I am getting BUSY or IOERR_BLOCKED when inserting a duplicated pk through C
interface.

If I do it through sqlite.exe I get: SQL error: PRIMARY KEY must be unique

Any ideas?

many thanks,

mariano



On Sun, Sep 21, 2008 at 9:05 PM, Mariano Martinez Peck <
[EMAIL PROTECTED]> wrote:

> Hi everybody!
>
> This is my first post in this list! I am very newbie with Sqlite. This is
> the first time I am trying to use it. I am using Sqlite3 trough C interface.
> The problem I have is this: I have a table created, just like this:
>
> CREATE TABLE materia(
>     codigo INTEGER PRIMARY KEY,
>     nombre CHARACTER VARYING(50),
>     observaciones CHARACTER VARYING(255),
> )
>
> Then I do 2 inserts one after the other, with the same data. For example:
>
> INSERT INTO materia(codigo, nombre, observaciones) VALUES (55, ''TADP'',
> ''Nothing")
>
> After doing this, I thought the second query ( i am using sqlite3_step()
> function ) will returns me a 
> SQLITE_ERROR<http://www.sqlite.org/c3ref/c_abort.html>.
> However, it SQLITE_IOERR_BLOCKED.
>
> Is this correct? what should sqlite3_step returns me in this case?
>
> Many thanks for the help,
>
> Mariano
> .
>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to