Wednesday, 26 September 2012

HOW TO: FIX ERROR - "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine"


NOTE: i have found hundreds of threads on this error, yet they all seem to suggest using the 'Microsoft access database engine'. however for whatever reason (even though its made for 64-bit office) this did not work on my machine so i was forced to find an alternate method.
this resolution works with:
  • 64-bit Windows 7
  • 64-bit MS Office
  • Please reply to this thread if it worked for you so i can make this a full "compatibility list"

trying to connect to an Access database in visual studio but keep getting this error?

however if, like me, that doesnt work for you, try the following method:
NOTE: this DOES work for office 2010 even though it is for 2007 office, dont ask me why it just does :)
2. in VS click add data source, follow the wizard and enjoy! :)

i did give up and tried storing to text files, but oh my god was that a bad choice! so i came back to trying to resolve this and managed to after HOURS AND HOURS of searching.
this thread is for all of those people being given a hard time connecting to Access databases!
Please share your opinions/ problems below!

ASP.NET Connection String

Resource:



Friday, 21 September 2012

Website Tips: When to use GIF? When to use JPG? When to use PNG?


Summery:

If you need transparency - Use gif
If you dont need transparency - use png.
If you use jpgweb page will take long time to load.

Size comparison with quality of image:
JPG size > GIF size > PNG size

When to use GIF?

Use GIF when there are large areas of uniform color and the total number of colors is smaller than 256. Consider the following image:
This above original image is saved in the PNG lossless format.
Next, the image was saved as a GIF and as a JPG:
GIF, 1.448 KGIF, 1.448 K
JPG, 2.436 KJPG, 2.436 K
The GIF image is a flawless copy of the original. GIF can make flawless copy at high compression as long as the image contains large areas of uniform color, as long as the image has no more than 256 colors.
The JPG image above is seriously degraded. The color of the circle has changed, and there are mottled areas in the (supposedly) white areas around the circle and the letters. Click here for an enlarged comparison image. Please note that the degradation of JPG images is controllable. JPG allows the user to choose the balance between file size and image quality, and one could choose better quality than in the above example. However, doing so results in an even larger file size for the JPG.
In the above case, GIF provides a better, in fact perfect, rendition of the original, while delivering a smaller file size. For images like the above, always use GIF.
As all recent browsers now support the PNG format, it is time to abandon GIF for most purposes. The PNG of the above image is smaller than the GIF, and PNG is not limited to 256 colors as is GIF. The only reason to use GIF is for images with transparency. PNG has superior transparency, but unfortunately Microsoft refuses to fix a bug in Internet Explorer’s treatment of PNG transparency. So to reach the widest audience, use PNG only for images without transparency.

  
Points to remember:

JPEG

  • Use JPEG to save photographs.
  • JPEG cannot have transparent backgrounds.
  • JPEG is not good at preserving exact colors – don’t use them for logos or text.

GIF

  • Use GIF to save images that have sharp lines (like text) and solid colors. Examples:
    • A solid red square
    • A typical corporate logo
  • Use GIF to save images that need to have a transparent background.
  • GIF was invented for creating screen graphics – don’t use GIF for images that you want to print on paper because they will look crappy.

PNG

  • Use PNG if you want to have images with blended (fades smoothly), transparent backgrounds.
  • Use PNG if you need to create print ready high-resolution graphics.

ASP.NET C# VS 2008/2010: Web.config

The connectionStrings element is a direct child of the <configuration> element and a peer of the system.web element.

Thursday, 20 September 2012

There is a problem with your selected data store


You have to Start->Run->'cmd', then change directory to the \windows\Microsoft.NET\2.0whatever\

Then run the aspnet_regsql.exe wizard.  It will walk you through creating the tables that the Config manager page should have done.

I ran the aspnet_regsql.exe from the command line with the appropriate parameters and it worked:
C:\Windows\system32>aspnet_regsql.exe -E -S propmancom\propmancon -A r
Start adding the following features:
RoleManager

Monday, 17 September 2012

How to find SQL Server Instance Name

Actually it is select @@servicename  (to find the last part of the instance)
So total name would be select @@servername + '\' + @@servicename

Tips / Tricks for Beginner ASP.NET


  1. Basic Foundation: layout it is better to use a Table in the master with one Row and two columns. Then it is easy to manipulate the layout and align it properly as you wish.
  2. Javascript: is type sensitive.
  3. Copy: Whenever you copy something from internet please remember to check the code again because it does not copy perfectly all the time. For example: "" and ' sign does not copy exactly.
  4. Query: If you type query directly into aspx.cs page then it is better to type it in on line. Because typing in several lines some times generate error.
  5. isPostBack EnableViewState AutoPostBack: Always take care of PostBack properly otherwise it will resets the value you want to set.
  6. If you put Webform inside a folder it does not work properly specially if you use script manager: - ASP.NET:I put a .aspx webform with AjaxToolKit-ScriptManager and it did not work. As soon as I put webform out of folder and put it in main project folder it starts working.