Archive Page 2

CSS Techniques by Smashing Magazine

I read an incredible post from Smashing Magazine today. It is a collection of 53 links to various CSS tips and tricks, techniques for developing different types of navigation, image mapping, table techniques, etc. It is definitely worth reading: 53 CSS-Techniques You Couldn’t Live Without.

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

How to migrate from MS Access to MS SQL Server 2005

Today I found a great post about migrating from MS Access to MS SQL Server 2005.

The tool used is called “SQL Server Migration Assistant for Access”. According to the description it “Automates database migration from Access to SQL Server 2005″.

If you want to migrate to MS SQL Server 2000 you can read my previous post “How to migrate from MS Access to MS SQL Server 2000″.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

How to migrate from MS Access to MS SQL Server 2000

Problem

From the practice lessons I’ve learned I came to the conclusion that Access databases can be used for simple CMS (Content Management Systems).
In most cases Access is not appropriate for creating complicated business logic. The case that I’m writing is about migrating an Access database to MS SQL Server 2000. The main goal was to achieve stable and scalable application based on MS SQL Server 2000.

Research

After some research I came upon different methods for migrating to MS SQL Server 2000. Below I’ll describe in details three of them:

Now I’ll describe the pros and cons according to my experience for each of the methods:

DTS usage

Pros:

  • All the tables are migrated successfully

Cons:

  • The relations between the tables are not migrated
  • The indexes are not migrated
  • The views are not migrated

Use of additional software (not free)

The pros and cons here depends on the software. The tools I tried are:

  • SSW Upsizing Wizard Pro - This software checks the Access database structure in depth and gives suggestions for improving the database tables. Implementing all the suggestions guarantee that Access Upsizing Wizard utility will be executed without errors.
  • MSSQL Migration Toolkit - Here you can find some tools for migrating from one database to another. The cons are almost the same as for using DTS

MS Access Upsizing Wizard

Pros:

  • All the tables are migrated successfully
  • All the relations are migrated successfully
  • All the CASCADE DELETE and CASCADE UPDATE definitions are migrated successfully
  • All “default value” column definitions are migrated successfully
  • All NULL column constraints are migrated successfully

Cons:

  • The views are not migrated at all
  • If there is a cyclic CASCADE definition between some tables, the relations between them are not migrated correctly.
    Tip: Triggers can be used in MS SQL Server 2000 to create the functionality of the CASCADE definitions that cannot be migrated
  • Some of the indexes appear more than once so all of them must be checked and cleared
  • PRIMARY KEY index must be set manually as CLUSTERED

Database structure migration

Considering the above pros and cons I decided to use the MS Access Upsizing Wizard utility and check after that which objects migrated successfully and which not.

Below are the steps that I executed after the Upsizing wizard had done its job:

  • I created all the views manually
  • I created some triggers because of the cyclic CASCADE definitions between two tables.
  • I checked and created (where needed) manually the relations between the tables with the cyclic CASCADE definitions
  • I cleared the redundant indexes

Data migration

I used simple DTS transformation of type “Copy column” for each table and each column in it.

How much time?

All of the research and migration took me about 3-4 days.
The database consisted of 30 tables and 30 views.

If you’re interested in databases and SQL you can read my previous post to find out How to refresh database views in SQL Server 2000/2005.

, , , ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

Add scrollbar to DIV tag content

Problem: Add horizontal and/or vertical scrollbar to the content of a DIV tag

Solution: There are different ways to add a scrollbar to DIV tag content. The easiest one is to use the CSS “overflow: scroll” property. Unfortunately in this case the scrollbar looks like the standard browser one and can be styled only in IE.

The best solution I found is the one provided by Dynamic Web Coding.
It’s very easy to use and also the scrollbar can be styled as you wish. Go to Dynamic Web Coding Scroll examples to read more about this.

Do not forget to read the purchase information before using the code.

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

Double margin bug in IE 6.0

The problem:

Recently I developed a site using DIV tags. They are floated on left or right in order to take the appropriate positions. I was very excited because the layout was perfect in IE 7, Firofox for Windows and Safari, Firefox for MAC.

Some days ago I took a look at IE 6 and I was very suprised because some of the images were moved to left in double. After some tests I realized that the “margin-left” style property I initialize is doubled in IE 6. It turned out that in-line elements adjacent to a floated div appear to be indented from their expected location.

The solution:

Add “display: inline;” to the style of the floated element which has the double margin problem.

Go and read “Floats, Margins and IE” article for more information about the problem.

, , , , ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

Mozilla CSS Extentions

Go to Mozilla Developer Center and find a lot of Mozilla CSS extentions.

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

Image rollover using CSS

Today I read a really cool article about creating image rollover effect using CSS and one image. This totally eliminates the usage of Javascript and OnMouseOver and OnMouseOut attributes.

Browsers supported: IE 5.5+, Firefox 1.07+, Opera 7.23+, Mozilla 1.7.12+, Netscape 6.02+, Safari 2.0+, Konqueror 3.4.3+

You can review the full artcile with example how to achieve this on Find Motive website.

, , , ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

Membership credential verification failed.

If you receive this error in the error log of your project here is its description and solution.

Prerequisites: Your application must have custom login functionality based on Forms Authentication method implemented. Also built-in functionality for Roles, Users and Membership must be used.

Problem: The visible issue is that the user cannot login to the application and the following error appears in the Event Viewer (Start -> Control Panel -> Administrative Tool -> Event Viewer):

Error in Event Viewer:
Event code: 4006
Event message: Membership credential verification failed.
Event time: 28/08/2006 12:30:12
Event time (UTC): 28/08/2006 09:30:12
Event ID: 04b22a752da345baabe19236fb25675f
Event sequence: 2
Event occurrence: 1
Event detail code: 0

Here is the solution: The “ApplicationName” value in “aspnet_Applications” database table and the “applicationName” property value for all providers in web.config (Membership provider, Role provider, Profile provider etc.) must have the same value.

You can read more in this article.

, , ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

Forms authentication failed for the request. Reason: The ticket supplied was invalid.

Recently I experienced a strange problem with custom login functionality based on Forms Authentication method. The visible issue is that sometimes I login successfully to my application, sometimes - I can’t. In all the cases the same login details are used. When I reviewed the Event Log I found the following error:

Event viewer error:
Event code: 4005
Event message: Forms authentication failed for the request. Reason: The ticket supplied was invalid.
Event time: 30/08/2006 15:43:33
Event time (UTC): 30/08/2006 12:43:33
Event ID: 8bffe75e7ff344c78fe1af8c1124e217
Event sequence: 894
Event occurrence: 388
Event detail code: 50201

Below you can find a short explanation and the solution how to prevent this behaviour.

In fact the application uses “machinekey” definition to generate the authentication cookie. If “machinekey” properties are not initialized in the web.config file, the application uses different values on the different servers. This way when you have been logged in on server X and then try to login on server Y it may happen to use the cookie from server X which is different from the one that server Y uses. Then you cannot login.

Therefore machinekey properties must be always defined for applications that are moved from server to server. Here is an example of “machinekey” definition:

You can generate it by using this .exe file: http://omar.mvps.org/pics/SecurityKey.exe

Here is how you can run it: SecurityKey.exe 24 64

You can read more about this problem and its solution in the following article: http://msmvps.com/blogs/omar/archive/2006/08/20/108307.aspx

, , ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

“Back” link not working in Firefox

Maybe some of you use the following approach to create “back” links:

<a href="#" onclick="javascript:history.back();">back</a>

I used to do it this way until it turns out that this is not working under Firefox.

Fortunately I found the solution while I was reading an article posted at Code Project website. The back button there was working even in Firefox. The code used is really simple:

<a href="javascript:history.back();">back</a>

Enjoy!

, ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb



Google

Blogroll


Blogroll Me!

Enter your email address:

Delivered by FeedBurner







Academics Blogs - Blog Top Sites