Categories
IT for all Support technique

DBF viewing

It happens as programmers that we have to deal with older database formats.

If you are in need of a dbf viewer, DBFPlus at http://www.alexnolan.net/software/dbf.htm does the trick.

It saved me a lot of time today.

Categories
Non classé

MySQL – Reminders

Get the list of users
SELECT User FROM mysql.user;

Add new user
CREATE USER 'user'@'host' IDENTIFIED BY 'password';

Create a database
CREATE DATABASE databaseName CHARACTER SET utf8 COLLATE utf8_general_ci;
* specify the character set and also the collation. Remember that stored procedure are created with the collation the database has and it will remain the same even if you change the database collation after.

Grand all privileges to user on a specific database
GRANT ALL ON databaseName.* TO 'user'@'%';
* in production, you should maybe limit the privileges.

Categories
Non classé

.Net C# Crystal Report / MySQL ODBC

Like many out there, I use Crystal Report for invoices and other kinds of report. What I like doing is exporting the result as a pdf on disk.

I just got a new laptop so I installed visual studio, mysql drivers,crystal report, etc…

If you have used Crystal Report for a while, you might have seen errors that are not so obvious. Let’s take that one.

System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the path specified

You expect the problem to be related to the folder you’re trying to write to. Maybe something related to permissions.

So you check and everything is fine.

The problem might not be the folder.

If your application is running in “Any CPU” and you are on a X64 machine, be aware that Crystal Report will be in 64 bit mode so it will try to use an 64 bit odbc connection which it might not find because you created it in 32 bit mode. Doh !

Categories
Non classé

Migrating from MSSQL Express to MySQL

I’ve been busy this last 2 weeks working on a big enough migration from MSSQL Express to MySQL. It’s been long and somewhat complicated process if you consider the pitfalls.

Here is part 1 on the migration process. Part 2 will be on the reasons you should think it through before actually doing it.

Just to be clear, it’s not a rant about MSSQL, I love how MSSQL works but it doesn’t prevent me for enjoying MySQL.

Why would you migrate from MSSQL Express to MySQL/MariaDB ?

As the business grows, your needs too. There are questions you don’t necessarily care about at the beginning but they end up catching up to you.

Replication, Replication, Replication
Hardware failure, fire, water leaks. Wait! What ?!? Are you suggesting any of these will happen to me? Yes it will, at least one of them, most probably the hardware failure.

It might seems stupid but how long can your business afford to be down ? 5 minutes, 8 hours, 2 days. If your answer is in the minutes, backups are just not enough anymore.

MSSQL Express edition doesn’t have it.

More storage
At the beginning, 10 GB seemed like a lot but now not so much. As an IT person, you might know what the next technology is but at the business level, you never know when a huge customer will come in. That new customer might be the reason why you need more space.

Performance
You don’t see it as a problem when 2-3 users are using your app or website. Make that number, 200-300. The query is now taking longer to run. Being limited to 1 GB of RAM and 1 CPU when dealing with a growing database is calling for problems. Yes tuning might often be the answer but it goes only a certain distance.

Money, money, money?
In most small to medium businesses, resources are limited and should be used only on improving the business itself.

Unless you are working for a software company, the software you use is just a tool and not your core business. The decision making should be about getting the best tool you can at the price you’re ready to pay. If you need to get a regular hammer, will you chose the one you need or the shiniest one? At the end of the day, you just need to hit the nail, up to you to decide how much money you want to have left in your pocket.

 

Categories
Development

Crystal Report – maximum report processing jobs limit

If you encounter the following error…

CrystalDecisions.Shared.CrystalReportsException: Load report failed. —> System.Runtime.InteropServices.COMException: The maximum report processing jobs limit configured by your system administrator has been reached.

Make sure you do the following after you are done with the report object….

report.Close();
report.Dispose();

It will probably save you some time.

Categories
Non classé

C# Add excel export feature to app.

Either it’s a web or desktop application, users have tools that they use and as developers we should make working with these tools easier.

Most users use Excel in their daily life when working with data. I think when the option to actually generate an excel file is available we should make use of it for their sake. Some will say that csv files do the work but in my experience it might work but it’s not always the best. Simply because some users don’t know how to open the csv files. We can’t assume the level of comfort of our users.

As for the ability to generate Excel files, please look into EPPlus at http://epplus.codeplex.com/. I started using it and it’s simple enough that you don’t need much time to learn it before using it.  I might give some examples in the future on how to use it.

It might be easier to stick with csv files or simply have no export functions but helping users should have an higher priority.

Categories
IT for all Security

I was annoyed with passwords ? I’m not anymore.

Hi everyone,

Couple of months ago I got really fed up with passwords. If you deal with many websites, it can get to dozens of different passwords. Off course, If you actually have different passwords for each of them. Let’s be honest, I was actually guilty of using the same one over and over.

I found the solution through a youtube video by Nixie, http://youtu.be/RvV698aztNs

With keepass, download here,  you can store your logins easily and it’s nicely encrypted and it’s cross platform, meaning you can use it on Windows, Mac and linux.

  • Organize your logins using categories (it can be subscriptions, email accounts, banking).
  • Generate strong passwords using the Password generator
  • Use the copy feature when it’s time to use your password. It stays in memory just long enough for you to paste it in the password field.
  • Bring it with you, it has a portable version.
  • Back it up just by copying the keepass database file.

I use it daily. If you don’t use a password manager already, you should start now. It’s free and easy to use.

Categories
Non classé

Linux Mint 17 – Dell Inspiron 17 7737 – Trackpad

Hi everyone,

If, like me, you have a Dell Inspiron and have Linux Mint installed (Or Ubuntu) and have problems with your track pad when scrolling or dragging windows,  consult this page : http://www.penguintutor.com/news/linux/dell-trackpad-ubuntu. It will save you from going insane.

In short, just go in the terminal and type the following:

1) sudo mkdir /usr/share/X11/xorg.conf.d/
2) sudo cp /usr/share/X11/xorg.conf.d/50-synaptics.conf /etc/X11/xorg.conf.d/
3) sudo gedit /etc/X11/xorg.conf.d/50-synaptics.conf
4)
In this section,
# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
Identifier "Default clickpad buttons"
MatchDriver "synaptics"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
# To disable the bottom edge area so the buttons only work as buttons,
# not for movement, set the AreaBottomEdge
# Option "AreaBottomEdge" "82%"
EndSection

Remove the # before Option “AreaBottomEdge” “82%”

Save the document.

Restart the computer.

That’s it !

Categories
Non classé Technical Support

Windows server SBS2011 – Backup problems

If you are having issues with Acronis Backup and Recovery 11.5 and Windows SBS 2011 or Windows 2008 (including R2), it might be related to your hard drive.

Take a look at this page for the support hard drive on Windows :

http://support.microsoft.com/kb/2510009

First thing you realize is that 4K (4096 bytes)  per sector is not supported on every version of windows.

Before buying a new hard drive, you might want to make sure that it is 512 bytes per sector.

Hope I was able to save you some time.

 

Categories
IT for all

Utilities and tools

I’ve been looking for inspiration for days now. I have some domains and haven’t done anything with them. It just bugs me. I accomplish a lot at work but this is my own personal stuff and I feel kind of guilty about it.

And tonight it came to me. What I have been doing lately ?

Recently I did a full reinstall of windows on my personal computer at home and realized how I always use the same tools. I do the same with friends and family computers and also at work.

Here are the basic tools I use.

Utilities

  • 7-zip. To compress and decompress files. It’s free and it’s probably the best. It’s fast and the compression ratio is just amazing. If you want to automate, take a look at the command line version, it works like a charm.  http://www.7-zip.org/
  • Cute PDF writer. You don’t always have a printer ready and sometimes you just don’t need a paper copy. This application acts as a printer and it gives you pdf. When you print to it, a window pops up and you enter the name you want for your file. It’s simple and it works.
    http://www.cutepdf.com/products/cutepdf/writer.asp
  • PSPad. It’s a simple yet powerful text editor. When you have large text files and notepad chokes when opening them. It’s the tool you want to use. It’s also very good with encoding. Just pay attention to say no to the junk when installing it. http://www.pspad.com/
  • LibreOffice. Sometimes it’s too pricey to get microsoft office or you just don’t need the advanced stuff you find in Excel. Basically a good editor for writing, good spreadsheet editor, and other great tools. If you can’t afford Visio, Draw might do the job.

What are the utilities or tools you first install when you get your hands on a computer ?