Adding SQL capability - bad idea? If not best way?

Topics: Developer Forum
Nov 15, 2006 at 2:43 AM
Your package is terrific. It has saved me a ton of work.

However, I need to have a database table that can be sorted based on a users request in multiple ways. (Name, weight, ID, age, etc.)

I'm thinking my best solution is to add sql
capability to the site.

I am a newbie on the internet, visual web developer, etc.

My queston is what I want to do a viable option or is there a better way to go.

If it is a viable option what approach would you recommend.

Thanks for any assistance you may provide
Coordinator
Nov 15, 2006 at 8:42 AM
Hi,

The fact that the MWPSK is not using a database does not mean that you can't add database access code and a SQL DB in order to implement your own extension. But of course you will end up with a solution, which is storing some data in files in /App_Data and some in your SQL Server database.

Because the whole kit is aligned with ASP.NET 2.0 concepts you may simply add the connection string entry to the web.config file and then create your own controls, which are accessing your database. Basically you can learn about database access in any ASP.NET 2.0 book or other exemples and then apply this to the MWPSK.

Actually, something like a reservation system is much easier to do with a real database in the background...
Nov 15, 2006 at 2:32 PM
Thanks very much for the info.

Another question, if I may.

I would like to add the sql capability so that it fits as seamlessly as possible into your system.

Primarily so that it is reflected in the navigation that is generated by your system. The menus.

I was thinking I may be able to do that with Visual Web Developer using your "User Control" section or possibly your "HTML" section.

Another thought was to have the sql table show up on the Home page.

Hope this makes sense.

Any specific suggestions you may have would be appreciated.

Thanks
Coordinator
Nov 15, 2006 at 7:54 PM
The easy way to add custom features to the MWPSK are the 'EasyControls'. Create an ordinary ASP.NET user control with your custom controls and your own code. Here you can easily use data access code.

Copy this control (.ascx and evtl. .ascx.cs) file(s) into the EasyControls folder.

Take your browser and log in as admin. Now you add a normal new page to the navigation structure. This will now show up in the navigation structure and therefore in the menu.

Navigate to your new page. Add an 'EasyControl' to the page and select your own control, which is now listed in the drop down box (in edit mode).
Nov 16, 2006 at 2:25 PM
Thanks for the help.

Very clear instructions. Thankyou

I still have one problem.

After I add "EasyControl" to my new page it does not present a drop down box. In fact there is no "Edit Mode" presented on the "EasyControl", only a "Delete Section".

I suspect I am not moving the controls into the EasyControlsfolder properly.

Shouldn't there at least be a "Hello World" displayed?

Any idea what I am doing wrong?

Thanks
Nov 17, 2006 at 1:10 AM
I just downloaded your latest version (1.01)

The problem I was having with (using version 1.00) the "EasyControl" does not appear to be a problem. The "EasyControl" Edit Mode along with the dropdown box appears with this version.

Hopefully this will take care of my problems.

Thanks again

Still would be interested in knowing what might be going on..........
Nov 17, 2006 at 3:03 AM
Spoke too soon.

Unable to add anything to the EasyControls folder w/o affecting the "start w/o debugging" process.

Only able to bring "Hello World" up in the
Easy Control drop down box.

Late now. Will work on it again tomorrow.

Any help w/be appreciated.

Thanks
Nov 17, 2006 at 9:27 PM
Still unable to add a new .ascx to the EasyControls folder. Would like some help on this if you can.

Did find a way to work around this problem by using HelloWorld.ascx. I placed my grid and sql controls in this HelloWord.ascx.

Worked great.

Now I need to add more tables but cannot do so until such time as I can add to the EasyControls folder.

Any ideas?

Thanks
Coordinator
Nov 20, 2006 at 3:31 PM
Dear customer

it should be possible to add UserControls in the Production Release 1.0.2. You need to place the ascx and .cs file into the folder \EasyControls\, then refrehs the site, where you placed your EasyControl (no postback).
I encountered some other unwanted behaviour of the EasyControl, as wrong naming of the "Edit Mode" and "View Mode" Button.

In the next release this bug will be fixed as well.
I hope it works for you as this.

Best regards,
Pascal

Nov 23, 2006 at 4:36 PM
It is now possible for me to add multiple sql tables using Easy Controls.

Thank you very much

Love this product
Mar 30, 2008 at 6:25 PM


pmurphy5263 wrote:
Your package is terrific. It has saved me a ton of work.

However, I need to have a database table that can be sorted based on a users request in multiple ways. (Name, weight, ID, age, etc.)

I'm thinking my best solution is to add sql
capability to the site.

I am a newbie on the internet, visual web developer, etc.

My queston is what I want to do a viable option or is there a better way to go.

If it is a viable option what approach would you recommend.

Thanks for any assistance you may provide