# RawSQL plugin error

**URL:** <https://forum.servoy.com/t/rawsql-plugin-error/7839>\
**Category:** Classic Servoy\
**Created:** [July 18, 2007, 4:54pm UTC](https://forum.servoy.com/t/rawsql-plugin-error/7839 "2007-07-18T16:54:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LOGIsoft](https://avatars.discourse-cdn.com/v4/letter/l/e36b37/32.png) [@LOGIsoft](https://forum.servoy.com/u/LOGIsoft)\
**Post date:** [July 18, 2007, 4:54pm UTC](https://forum.servoy.com/t/rawsql-plugin-error/7839/1 "2007-07-18T16:54:33Z")

</div>

Hello everybody,

I’m using Servoy 3.5RC5 on a Mac Intel. I would like to use the rawSQL plugin to feed data to a Sybase 9.02 table, but I get a message (using plugins.rawSQL.getExceptionMsg() ) saying that my primary key cannot be NULL.

I certainly understand that, but I would’ve thought that the rawSQL plugin would take care of creating the rows, putting the autoenter incremented value in the PK, which is not referenced at all in my code… ![:?]( "Confused")

Here is my code (the server and table names are defined as globals earlier in the method):

```auto
var sqlString = "INSERT INTO mod_ls_importer_table01 (ls_supplier_no, ls_supplier_name) VALUES('1188','Messagerie XYZ');";

plugins.rawSQL.executeSQL(svrName, tblName, sqlString);

```

Any clues as to how to avoid the error condition and effectively import the data in the table?

Thanks in advance,

Ben

---

<div class="post-metadata">

**Author:** ![Jan\_Aleman](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jan\_Aleman](https://forum.servoy.com/u/Jan_Aleman)\
**Post date:** [July 18, 2007, 5:39pm UTC](https://forum.servoy.com/t/rawsql-plugin-error/7839/2 "2007-07-18T17:39:18Z")

</div>

Obviously if your Primary key is Servoy managed the rawSQL plugin will not update your primary key, that’s why we call it raw it goes straight to your database with no Servoy intervention. What you can consider to do is set an autoincrement PK in sybase, then in Servoy set the PK to db managed.

---

<div class="post-metadata">

**Author:** ![LOGIsoft](https://avatars.discourse-cdn.com/v4/letter/l/e36b37/32.png) [@LOGIsoft](https://forum.servoy.com/u/LOGIsoft)\
**Post date:** [July 18, 2007, 6:24pm UTC](https://forum.servoy.com/t/rawsql-plugin-error/7839/3 "2007-07-18T18:24:05Z")

</div>

Thanks for the quick reply Jan, I tested with your recommendations and it works! ![:)]( "Smile")

Sincerely,

Ben
