Kruel Tech

Technical solutions to technical problems

  • Home
  • kruelintent.com
  • Contact
  • Videos
  • RSS Feed

Categories :

  • Home
  • kruelintent.com
  • Contact
  • Videos
  • Forum

All Videos

  • List all videos

Latest posts :

  • the hub - Part II(25)
  • the hub - Part 1(25)
  • ASP.net facebook app(97)
  • Compact a locked Access Database(97)
  • Images in a SQL Server database(421)

Popular posts :

  • Images in a SQL Server database(421)
  • Disable submit button on postback from Update Panel(300)
  • Progress bar (Part 1) - Javascript calls to a webservice(299)
  • Update Panel Popup message box(226)
  • Progress bar (Part 2) - The progress bar(211)

External Links :

  • Scott Guthrie
  • Josh Stodola
  • Joe Stagner
  • webdeveloper.com
  • Open Source web design
  • AJAX Videos
  • Developer Fusion
  • W3 Javascript
  • DevShed Forums

Visitors :

Locations of visitors to this page

Latest Articles

the hub - Part II

In this video I show the code behind the flickr section of the hub. It integrates with flickr using the flickrnet API from codeplex. I also show my image.aspx which streams images from other websites as byte arrays through your website to sidestep organisational website blocking of sites - in this case, flickr.com.

Please use the forum if there are any questions about this video.



Video viewed 25 times.

the hub - Part 1

kruelintent.com hub - part 1 demonstrates my hub website. In it I interface with twitter, facebook, flickr, my blog and my forum. In this video I show the flickr interface and talk about the other options. In the next 3 or 4 videos I will show the code behind each part of the hub website.

Please use the forum if there are any questions about this video.



Video viewed 25 times.

ASP.net facebook app

facebook app part 1 showing connecting to the API. The application uses a webservice for partial page loading and also the scripaculous javascript engine to add some really 'cool web 2.0' goodness into the mix

Please use the forum if there are any questions about this video.



Video viewed 97 times.

Compact a locked Access Database

Did you see that I have an RSS feed now?

As with most development projects, this one was born from necessity. For reasons that are not important I push a large amount of data down to an Access database every night and, Access being Access, the file size becomes an issue all too often as it doesn't really know how to deal with large INSERTS and DELETES without expanding exponentially... Anyway, to cut a long story short, this Access database is constantly locked by another process so in order to clear the locks and compact the database I would need to reboot the server it was sat on and open it / compact it as soon as it came back up. This is until I was reminded a couple of weeks back about the Computer Management console which allows me to see and administer remote connections to shared files (such as this database)
Computer Management
All I needed to be able to do was programmatically find any sessions locking the database and then kill them off and then I could programmatically compact the database, write a log and jobs a goodun. The WMI script that I need (I tried a few) was ServerSession. I got the basic code using the scriptomatic tool which is a (VERY USEFUL) free download from MS.
Scriptomatic
Then all I needed to do was code it. You will see that in the video. The best thing about it being a windows application is that, as an exe, I can schedule it to run as part of the overnight backup so I should never see the mdb going to stupid size ever again. Here is what the log file looks like
Log File
A final warning would be to make sure you set the Engine in the Jet connection correctly for the Access version of the database you are trying to compact. In this example the database is Access '97 (I KNOW!) which is engine type 4. Most newer ones are 5. Enjoy. Demo code available here!

Please use the forum if there are any questions about this video.



Video viewed 97 times.

Images in a SQL Server database

In this video I will show you how to upload images directly into a SQL server database and create a JPEG compressed thumbnail on the fly. The code I create in this video is available in this link. In this video I use code to create a thumbnail image and I have taken this from this great website where it is explained in even more detail!

Please use the forum if there are any questions about this video.



Video viewed 421 times.

Javascript fun, text counter and font sizer

Here are a couple of javascript goodies that you may want to add into a website once or twice. The client side font size script is so simple but effective I now have it as standard on most of my websites (not this one mind...) The text counter is really just for fun and to show client side scripting for those who are new to it. It could have a use at times where you are working with limited text fields in a database.

Back to AJAX on the next video. Haven't come across anything worth putting to video yet.

Please use the forum if there are any questions about this video.



Video viewed 142 times.

Progress bar (Part 2) - The progress bar

In this second video I have extended the original calls to the webservice and added a few methods and functions to the webservice itself. This way using 2 different methods we are able to send progress reports back to the client and then display them however we want - in this case, a progress bar and percentage count. During the coding I discovered a lot about the way webservices work. Initially, I wanted to create an instance of the webservice class in the javascript and simply use a property but this doesn't work as the webservice is state less and doesn't work like that. Also, this is the same reason why using a session state variable will not work in this case. Frustrating... but I like a challenge. Hope this demo is useful to some people. I know I am going to use it. I have at least 3 websites at work which are just pretty front ends to huge SQL queries and a lot of number crunching and this method is a very simple way of keeping the user informed.

Please use the forum if there are any questions about this video.



Video viewed 211 times.

Progress bar (Part 1) - Javascript calls to a webservice

This is the first of two videos where I will build a realtime progress bar to monitor progress of a server side function using javascript calls to a webservice. In this video I will set up the webservice and demonstrate the asyncronus functionality that is standard in javascript.

Please use the forum if there are any questions about this video.



Video viewed 299 times.

Client side validation

In this video I will show an update panel with a datagrid inside and show how we can use client side validation to govern the behaviour of server side controls. In the last part of this video I have used a script from Smartwebby.com to validate a date prior to postback.

Please use the forum if there are any questions about this video.



Video viewed 166 times.

Update Panel Popup message box

This video describes extending the sys event handlers to enable an alert message to be displayed using server side code to set the message and javascript to display it.

Please use the forum if there are any questions about this video.



Video viewed 226 times.

Disable submit button on postback from Update Panel

This is a video showing an extension to Joshs button disable script so that it works with UpdatePanels. The video shows the working code and the javascript used to make it work correctly. Josh's original blog post can be found here


Please use the forum if there are any questions about this video.



Video viewed 300 times.
© Copyright by kruel intent | Design by Minimalistic Design