Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » PostgreSQL example does not save data to database
PostgreSQL example does not save data to database [message #20572] Tue, 24 March 2009 05:04 Go to previous message
rtmex is currently offline  rtmex
Messages: 9
Registered: March 2009
Location: Puebla, MEXICO
Promising Member
Hi, I recreate the PostgreSQL example, just with another table

It works ok, but the data is not saved to the PostgreSQL table when I check it with pgAdmin III.

The table in the database has more fields but I'm just using 3 fields in my code, just to test.

This is my InsertTestData function

bool prueba_Postgres::InsertTestData()
{
Sql sql(m_session);
sql.ClearError();
sql.Begin();

sql * Delete(estacion);
sql * Insert(estacion)
(cve_estacion, 1)
(nombre_estacion, "ESTACION 1")
(siglas, "SIGLAS 1")
;

sql * Insert(estacion)
(cve_estacion, 2)
(nombre_estacion, "RADIO ORO")
(siglas, "XH-ORO")
;

sql * Insert(estacion)
(cve_estacion, 3)
(nombre_estacion, "ESTACION 3")
(siglas, "SIGLAS 3")
;

if(!OkCommit(m_session, "Unable to insert test data."))
return false;

return true;
}

This is my .sch file

TABLE_ (estacion)

INT_ (cve_estacion) PRIMARY_KEY
STRING_ (nombre_estacion, 30) INDEX
STRING_ (siglas, 10)

END_TABLE

Tha SqlArray show the data but the data is not saved to the table in the database
What could by the problem?

Thanks in advance
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Trouble Adding rows to SqlArray
Next Topic: '?' make errors
Goto Forum:
  


Current Time: Mon May 13 18:37:01 CEST 2024

Total time taken to generate the page: 0.03033 seconds