(no subject)
"Randy Davis" <[email protected]> Thu, 18 Mar 2004 09:04:14 -0600
| Newsgroups | gmane.comp.lib.sql.sqlpp |
|---|---|
| Message-ID | <002301c40cfa$48d459d0$6b01a8c0@radavis001> |
This is a multi-part message in MIME format. ------=_NextPart_000_0024_01C40CC7.FE39E9D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The question(s) and comments below were transferred from "support request". I am still using sqlpp and I have had few problems with the C++ Libs. I use the multi-column primary and foreign key methods extensively. In fact, I have generated flawless queries with multiple tables having multi-column PK and FK relationships. The problems outlined below began when I generated ASPX, C# code behind and C#. Regards, Randall Davis Previous JD comments: Hi, if you are still using sqlpp it would be nice to discuss such features in the mailing list. You can define multiple primary key without problem. I'll put an example on the wiki. R.D. Question: Summary: Primary Keys Initial Comment: I am using sqlpp to model and QBE using a meta data repository and I have had great success with a few exceptions(spacing around "AND" in joins). I make a few changes and it seems to work fine. I am now testing CS and aspnet generation. I am using release 2.9, XP pro and VS2003. I am new to C# and ASP.NET and the DNN approach to data access, but the problems I am having actually occur due the assumption that primary keys are generated ids or sequences. All of the pk's and fk's in my repository are multi-column and must be input by the user. The CS generator and aspnet generators (implicitly) assume that the pks are generated. Is there a way to get around this assumption? BTW, the control generator generates code to access text boxes that are not created for primary key columns. There is also a problem with this construct // m_RA_IDE_CHANGE_RULE_TBLDataGrid.OnItemCommand= "m_RA_IDE_CHANGE_RULE_TBLDataGrid_Click"; the method is not accessible due to protection level. Booleans should be initialized with true (currently "True"). This gives a string conversion error. ------=_NextPart_000_0024_01C40CC7.FE39E9D0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 6.0.4630.0"> <TITLE></TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <UL><UL> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">The question(s) and comments below were = transferred</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"> <FONT SIZE=3D2 FACE=3D"Courier = New">from</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> = <FONT SIZE=3D2 FACE=3D"Courier New">“</FONT></SPAN><SPAN = LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT SIZE=3D2 = FACE=3D"Courier New">support request</FONT></SPAN><SPAN = LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT SIZE=3D2 = FACE=3D"Courier New">”</FONT></SPAN><SPAN = LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT SIZE=3D2 = FACE=3D"Courier New">.</FONT></SPAN></P> <BR> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">I am still using sqlpp and I have had few problems with the C++ = Libs. I use the multi-column primary and foreign key methods = extensively.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"> <FONT SIZE=3D2 FACE=3D"Courier New">In fact, I have = generated flawless queries with multiple tables having multi-column PK = and FK relationships.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"> <FONT SIZE=3D2 FACE=3D"Courier New">The problems = outlined below began when I generated ASPX, C# code behind and = C#.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"></SPAN></P> <BR> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">Regards,</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">Randall Davis</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"></SPAN></P> <BR> <BR> <BR> <BR> <BR> <BR> <BR> </UL></UL> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">Previous JD comments:</FONT></SPAN><SPAN = LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P> <UL><UL> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">Hi, if you are still using sqlpp it would be nice to discuss such = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">features in the mailing list.</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">You can define multiple primary key without problem. I'll put = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">an example on the wiki.</FONT></SPAN></P> <BR> </UL></UL> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">R.D. = Question</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">:</FONT></SPAN><SPAN = LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P> <UL><UL><UL><UL><UL><UL> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">Summary: Primary Keys</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">Initial Comment:</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">I am using sqlpp to model and QBE using a meta data = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">repository and I have had great success with a few = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">exceptions(spacing around "AND" in joins). I make a few = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">changes and it seems to work fine.</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">I am now testing CS and aspnet generation. I am using = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">release 2.9, XP pro and VS2003. I am new to C# and = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">ASP.NET and the DNN approach to data access, but the = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">problems I am having actually occur due the assumption = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">that primary keys are generated ids or sequences. All of = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">the pk&#039;s and fk&#039;s in my repository are = multi-column and </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">must be input by the user. The CS generator and aspnet = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">generators (implicitly) assume that the pks are </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">generated. Is there a way to get around this </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">assumption?</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">BTW, the control generator generates code to access = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">text boxes that are not created for primary key </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">columns. </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">There is also a problem with this construct</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">// = </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">m_RA_IDE_CHANGE_RULE_TBLDataGrid.OnItemCommand=3D</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">"m_RA_IDE_CHANGE_RULE_TBLDataGrid_Click";</FONT></SPAN></P= > <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">the method is not accessible due to protection = level.</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">Booleans should be initialized with true </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Courier = New">(currently "True"). This gives a string conversion = error.</FONT></SPAN></P> </UL></UL></UL></UL></UL></UL> </BODY> </HTML> ------=_NextPart_000_0024_01C40CC7.FE39E9D0-- ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click