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 » firebird with sqlarray ctrl (possible?)
firebird with sqlarray ctrl (possible?) [message #41823] Sun, 26 January 2014 22:13 Go to next message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

HI-

I fooled around today with Firebird from the bazaar.

In the code below, I noticed that only some of the Sql class seems to work. When I try to use SqlId, it complained.

I don't know what to use for this line:
SqlSchema sch(SQLITE3); //I tried (FIREBIRD)

To keep it simple, I don't get how to use SqlArray or schema. Is it possible? I think I remember getting an error that said something about dialect. I like Novos code with Ultimate better than trying to use IBPP.

thanks very much!
mtdew3q

FBSession s;
s.Connect(
	"c:\\Users\\airport\\data\\TEST.fdb",
	"localhost:xxxx",
	"dodo",
	"bird"
			);
		
 String s1;
 SqlId ITEM_ID("ITEM_ID"),MENU("MENU");
 Sql sql(s);
 //sql.SetStatement("select * from sales_catalog");
 //sql.Execute();
 sql * Select(ITEM_ID).From(MENU);
 while(sql.Fetch()){
   s1= sql[0];
   PromptOK(s1);  
	     
//	Cout() << stmt[0] << '\n'  ;
	 
}
Re: firebird with sqlarray ctrl (possible?) [message #41830 is a reply to message #41823] Mon, 27 January 2014 10:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mtdew3q wrote on Sun, 26 January 2014 16:13

HI-

I fooled around today with Firebird from the bazaar.

In the code below, I noticed that only some of the Sql class seems to work. When I try to use SqlId, it complained.

I don't know what to use for this line:
SqlSchema sch(SQLITE3); //I tried (FIREBIRD)

To keep it simple, I don't get how to use SqlArray or schema. Is it possible? I think I remember getting an error that said something about dialect. I like Novos code with Ultimate better than trying to use IBPP.

thanks very much!
mtdew3q

FBSession s;
s.Connect(
	"c:\\Users\\airport\\data\\TEST.fdb",
	"localhost:xxxx",
	"dodo",
	"bird"
			);
		
 String s1;
 SqlId ITEM_ID("ITEM_ID"),MENU("MENU");
 Sql sql(s);
 //sql.SetStatement("select * from sales_catalog");
 //sql.Execute();
 sql * Select(ITEM_ID).From(MENU);
 while(sql.Fetch()){
   s1= sql[0];
   PromptOK(s1);  
	     
//	Cout() << stmt[0] << '\n'  ;
	 
}



I have not used Firebird yet, but that "driver" part of Sql is quite unrelated to SqlId or SqlArray, so I guess the problem your are reporting might not be quite related to Firebird per see.

Have you gone through SQL tutorial?

http://www.ultimatepp.org/srcdoc$Sql$tutorial$en-us.html
Re: firebird with sqlarray ctrl (possible?) [message #41831 is a reply to message #41830] Mon, 27 January 2014 11:36 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

Hi Mirek-

Yes, I have checked out Sql tutorial a little with Firebird. That is what I based my question on.

I'd leave it up in the air until a more experienced user checks it out and has time to test. Maybe someone else who uses Firebird will post regarding SqlId or SqlArray with that driver.

I could be doing something wrong.

Have a cool work week!

thanks,
mtdew3q

Re: firebird with sqlarray ctrl (possible?) [message #41844 is a reply to message #41823] Wed, 29 January 2014 04:52 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

HI-

I checked out postgresql with sqlarray using tutorials.
I used an 8.4.xx version.

It works with SqlId and SqlArray.

I will try one more time with Firebird a different night now that I have some working code to compare it to.

I probably will later on this work week at night.

Thanks very much Mirek,
mtdew3q
Re: firebird with sqlarray ctrl (possible?) [message #41858 is a reply to message #41844] Fri, 31 January 2014 02:32 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

Hi-

enum {
	ORACLE    = 1,
	SQLITE3   = 2,
	MY_SQL    = 4,
	MSSQL     = 8,
	PGSQL     = 16,
	FIREBIRD  = 32, // not implemented yet
	DB2       = 64, // not implemented yet
};



The code above is taken from Sqlexp.h. It appears if I pass in an invalid session, it doesn't complain until I try to do something with it.

m_array.SetSession(s);

I can't use this type of code:
Sql sql;
This means I can't build sql * expressions.

The Firebird code can do a lot but it isn't integrated as fully as the other db(s).

It took a lot of work to make the Firbird 'driver' and to implement it is a lot of work too. I am just a hobby person. I realize there is value in the Firebird code not even fully integrated. Some vendors charge for this kind of cool stuff with NO integration to Sql plugin or SqlArray. The api is so difficult without a 'driver' and an explanation how to use it. The driver is worth a lot a programmer.

Thanks for making the cool code in Ultimate. It is very cool to have both Firebird and Postgresql on the site. I like them both.

Have a cool weekeend,

mtdew3q
Re: firebird with sqlarray ctrl (possible?) [message #41859 is a reply to message #41823] Fri, 31 January 2014 02:37 Go to previous message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

oops ....
I meant to say Sql package added to the IDE project (NOT plugin).

"NO integration to Sql plugin or SqlArray."

thanks
Previous Topic: size of S_XXX struct members
Next Topic: SqlId aliasing
Goto Forum:
  


Current Time: Thu Mar 28 13:43:20 CET 2024

Total time taken to generate the page: 0.00968 seconds