Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Meel

Pages: [1]
1
Thank you Arshad that seemed to do the trick! :D
 
But tanking your and Geerts warnings into consideration I'll try to think of some other way of solving the main problem

M

2
A) as I said above CREATE TABLE without primary key works perfectly fine. Can insert and select data as with any other database. The problem arises once I append PRIMARY KEY to ID INTEGER, the I get an syntax error

3
A) sorry, there are quotationmarks in the original just forgot them when typing the question.

B) hmm, even when the tables are disjoint from the rest of the EA structure?

4
I am writing an add-on for EA in C# and need to create an extra table, but I seem to have hit a wall concerning primary keys.

The following code works just fine:
Code: [Select]
repository.Execute(CREATE TABLE MyTable (ID INTEGER, message TEXT) ;);
But once I add PRIMARY KEY after the first argument to get
Code: [Select]
repository.Execute(CREATE TABLE MyTable (ID INTEGER PRIMARY KEY, message TEXT) ;);
Or add an extra argument as follows :

Code: [Select]
repository.Execute(CREATE TABLE MyTable (ID INTEGER, message TEXT, PRIMARY KEY(ID)) ;);
I get a syntax error.

Anyone who sees what I am doing wrong? Or know why I can not set ID as primary key?
Any help will be much appreciated,  thanks in advance

Pages: [1]