PostrgreSQL error 3

Hello all.

I get an error 3 (ERROR: current transaction is aborted, commands ignored until end of transaction block) whenever I try to create a table.

This code does not work:

[code]Dim S As String = “CREATE TABLE defaults_controller (server_ip character(20),ping_interval integer,activitysummary_update_interval integer,transaction_sync_interval INTEGER,serverport smallint,”
S = S + “noresponsetimeout smallint,disconnect_delay smallint,master_loginid character(50),master_pw character(30),corp_id INTEGER,site_id INTEGER PRIMARY KEY,device_cpu_serial CHAR(64),”
S = S + “ui_id INTEGER,user_pw CHAR(30),license_path CHAR(255),data_path CHAR(255),auto_print CHAR(1),langauge CHAR(25),date_format CHAR(10),in_debug_mode INTEGER,ip_update_interval INTEGER,”
S = S + “ip_update_retries INTEGER,resend_cmd_interval INTEGER,resend_cmd_max_retries INTEGER,listen_port INTEGER, mac_address CHAR(18) );”

db.SQLExecute(s)
[/code]

This code does - from the samples:

Dim S As String = "CREATE TABLE defaults_controller (server_ip character(20),ping_interval integer,activitysummary_update_interval integer,transaction_sync_interval INTEGER,serverport smallint,"
S = S + "noresponsetimeout smallint,disconnect_delay smallint,master_loginid character(50),master_pw character(30),corp_id INTEGER,site_id INTEGER PRIMARY KEY,device_cpu_serial CHAR(64),"
S = S + "ui_id INTEGER,user_pw CHAR(30),license_path CHAR(255),data_path CHAR(255),auto_print CHAR(1),langauge CHAR(25),date_format CHAR(10),in_debug_mode INTEGER,ip_update_interval INTEGER,"
S = S + "ip_update_retries INTEGER,resend_cmd_interval INTEGER,resend_cmd_max_retries INTEGER,listen_port INTEGER, mac_address CHAR(18) );"

mDB.SQLExecute(s) //(sql)
  

I don’t see what the difference is. Both are executing but only 1 works.

Any ideas what I am doing wrong?
Tim

They’re executing on different databases.

Hi Tim.

Yes, they are. I changed it to the same database “axcys” and the same result. The sample worked, mine did not!
What does “ERROR: current transaction is aborted, commands ignored until end of transaction block” mean? I removed the START TRANSACTION command and no difference.
Tim

Found it!
Was doing another transaction prior to this that was left incomplete.

Thanks for your help!
Tim

Sorry, that was the only difference I saw.

It got me thinking!
Another question - I use DATETIME in SQLite. What is the equivalent in PostgreSQL?

Tim

timestamp without time zone . Not sure if SQLite’s Datetime is with or without time zone and too lazy to check right now.

[quote]
SQLite does not have a storage class for storing dates and/or times. Instead, the built-in Date and Time Functions of SQLite are capable of storing dates and times as TEXT , REAL , or INTEGER values: TEXT as ISO8601 strings (“YYYY-MM-DD HH:MM:SS.SSS”).[/quote]

[quote=435739:@Tim Seyfarth]Found it!
Was doing another transaction prior to this that was left incomplete.

Thanks for your help!
Tim[/quote]

Mak this as answer

Thanks for the help everyone!
Tim