DB2 doesnt like [ and ]

All your dOOdad needs ...

DB2 doesnt like [ and ]

Postby jpvanheerden on Mon Aug 07, 2006 12:31 pm

Hi

I have made my first dOOdad based application live, but I needed to make some changes to OleDbDynamicQuery.cs and BusinessEntity.cs so that DB2 would be happy with SQL. DB2 doesnt like [ and ] around table and column names.

Obviously I didnt want to change the framework itself, but I had to, otherwise it wouldnt have worked.

The following is an example of the change:

columnName = \"[\" + wItem.Column + \"]\";

changed to:

columnName = wItem.Column;

Can we create a property called DoesntLikeSquareBrackets that if set to true wouldn't try to create square brackets around table names and columns?

Any ideas?

Thanks
Jean-Pierre
User avatar
jpvanheerden
Staff Sergent
 
Posts: 37
Joined: Mon Jul 03, 2006 8:12 am
Location: Cape Town, South Africa

Postby dnparsons on Mon Aug 07, 2006 9:32 pm

Instead of changing BusinessEntity.cs, I would override AddNew in OleDbEntity.cs. You can look at MySql4Entity.cs to see how that was done. That way you only affect the OleDb dOOdads data adapter, not all the others (just in case you need them down the road.)

Of course, the best solution would be to make a DB2 specific dOOdads data adapter by copying the OleDbDynamicQuery.cs and OleDbEntity.cs files, rename them Db2DynamicQuery.cs and Db2Entity.cs, and put the provider specific code there. The tricky part would be making the dOOdads Business Entity template DB2 aware. But, if you did that, and shared, you might get your name in lights :-)
David Neal Parsons
EntitySpaces
User avatar
dnparsons
Lieutenant General
 
Posts: 292
Joined: Sun Jan 09, 2005 2:10 pm
Location: Miami, Florida

Postby jpvanheerden on Tue Aug 08, 2006 5:56 am

David

Thanks for the input, I give that a go.

Jean-Pierre
User avatar
jpvanheerden
Staff Sergent
 
Posts: 37
Joined: Mon Jul 03, 2006 8:12 am
Location: Cape Town, South Africa

Postby jpvanheerden on Thu Aug 10, 2006 6:58 am

Morning all

I have made the changes suggested - I have created Db2DynamicQuery.cs and Db2Entity.cs and ammended the \"dOOdads Business Entity\" template to be aware of iSeries and then offer the option of using the classes above instead of OleDbDynamicQuery.cs and OleDbEntity.cs

Where should I send the classes and template so that they are included in the next build?

Jean-Pierre
User avatar
jpvanheerden
Staff Sergent
 
Posts: 37
Joined: Mon Jul 03, 2006 8:12 am
Location: Cape Town, South Africa

Postby dnparsons on Thu Aug 10, 2006 7:04 pm

That is awesome :-)

I wouldn't presume to speak for Mike or Justin about getting them included in the next build, especially since I do not even have access to an iSeries to help test. There would be a lot of work ahead before that happened... VB version, testing, documentation, etc.

In the meantime, they have generously provided a template archive, so you can still share and get some peer-to-peer feedback. There are some general template archive instructions in this thread. As an avid MyGeneration user, I have some specific (but un-official) suggestions:

Before uploading, (assuming you started with a working copy of he official template), make sure you gave the template a unique Guid, Name, NameSpace, and SaveAs filename.

I would create a \"DB2 DataAdapter for dOOdads(Beta)\" template archive and post it there. You should also zip up the cs files and upload them as well. This will give you a description area to elaborate a bit on its use, will give the community an opportunity to try it out, and will notify you via email of messages posted in the archive.

As far as template archive categories, unfortunately, there is no specific category for dOOdads. I think Multi-Tier, Win32, and C# would give people ample opportunity to find it.

I would announce it in the peer-to-peer forum.

I hope this helps,
David Neal Parsons
EntitySpaces
User avatar
dnparsons
Lieutenant General
 
Posts: 292
Joined: Sun Jan 09, 2005 2:10 pm
Location: Miami, Florida

Postby jpvanheerden on Fri Aug 11, 2006 8:33 am

David

Suggestions followed to the letter :wink:


Jean-Pierre
User avatar
jpvanheerden
Staff Sergent
 
Posts: 37
Joined: Mon Jul 03, 2006 8:12 am
Location: Cape Town, South Africa

Postby jpvanheerden on Fri Aug 11, 2006 11:51 am

David

Browsing around the templates I noticed that you did some work on generating C# forms - whats the status on that?

Thanks,
Jean-Pierre
User avatar
jpvanheerden
Staff Sergent
 
Posts: 37
Joined: Mon Jul 03, 2006 8:12 am
Location: Cape Town, South Africa

Re:

Postby dnparsons on Fri Aug 11, 2006 12:03 pm

jpvanheerden wrote:Suggestions followed to the letter :wink:

hehe... I can see that. I'm glad you found them useful. Now, if I could only get my nieces and nephews to take me seriously. If your last post had been, "You're not the boss of me!", it would have been OK. I would have felt like I was back vacationing at my sister's.

Thanks for sharing :D
David Neal Parsons
EntitySpaces
User avatar
dnparsons
Lieutenant General
 
Posts: 292
Joined: Sun Jan 09, 2005 2:10 pm
Location: Miami, Florida

Postby dnparsons on Fri Aug 11, 2006 12:21 pm

My focus is now on EntitySpaces. Some generous users did pick up where I last left things. MyKey0815 converted them to VB, well0549 has improved upon those, and MadMan2 has a version for the .NET 2 DataGridView and other niceties.
David Neal Parsons
EntitySpaces
User avatar
dnparsons
Lieutenant General
 
Posts: 292
Joined: Sun Jan 09, 2005 2:10 pm
Location: Miami, Florida


Return to dOOdads - MyGeneration's .NET Architecture

Who is online

Users browsing this forum: No registered users and 0 guests

cron