How to enable VSS over the Internet
August 19th, 2008I found this great tutotial that I recommend: http://alinconstantin.homeip.net/webdocs/scc/VSS_Internet.htm
I found this great tutotial that I recommend: http://alinconstantin.homeip.net/webdocs/scc/VSS_Internet.htm
It is difficult to use a parameterized query in VS to get data from a mdb database. You usually have to use ? instead of the parameters, but if you want to use the parameter more than once (like in an iif function or something like that), then you should probably need to use the name of the parameter.
To make a long story short, just use [@name]. Notice both [] and @ signs.
This is such a frustrating error, because it is generated by the Lexmark printer that you probabilly have. After googleing for a solution, you can try reinstalling Office, the Lexmark software, etc etc. Actually, this solution, taken from here should work:
goto c:\windows\system32\spool\drivers\w32×86\Lexmark_x1100_seriesf27b
and copy lxbkprpr.dll to c:\windows\system32if you don’t have c:\windows\system32\spool\drivers\w32×86\Lexmark_x1100_seriesf27b
then just search for the dll.This will resolve the issue.
And, another good advice from this guy:
Don’t buy lexmark printers cos lexmark don’t know what day it is.
I wanted to use the connection string that was automatically generated, so I googled for a solution and I found this: System.Configuration.ConfigurationSettings.AppSettings[name of item].
Unfortunately, when building, you get “System.Configuration.ConfigurationSettings.AppSettings’ is obsolete”. This is because Microsoft has removed the AppSettings class from the System dll. The best solution I have found is here:
System.Configuration.ConfigurationManager. AppSettings[name of item]
And remember to add a reference to System.Configuration.dll.
The .ToString method has some wonderful features. If you want to display only 2 decimals for a number, you just have to display the format, like this: yourNumber.ToString(”N2″).
I found this solution on http://www.geekpedia.com/Question10_How-can-I-format-a-number-to-x-decimal-places.html. You can find there more formatting methods, in case you have some strict preferences.
IIS is a bit scary, especially for people used to working with Apache. Still, if you use IIS and would like to work with the CodeIgniter framework, you just have to add a “?” in the config.php, next to “index.php” and it will work like a charm.
Just a note: I found this solution on http://codeigniter.com/forums/viewthread/71641/.
Some of the operating systems that we install our applications on, have the Regional Settings set to Romanian. So there can be problems with the numbers and date formatting. The best sollution is to set your application culture, no matter what the OS culture is:
using System.Threading;
using System.Globalization;
// Put the following code before InitializeComponent()
// Sets the culture
Thread.CurrentThread.CurrentCulture = new CultureInfo("ro-RO");
// Sets the UI culture
Thread.CurrentThread.CurrentUICulture = new CultureInfo("ro-RO");
The code is taken from http://msdn2.microsoft.com/en-us/library/b28bx3bh(VS.71).aspx.
Since I had to google this to find a good way to only use the datepart of a datetime field from my database, I tought you might use this:
convert(datetime,(convert(varchar (11),getDate())))
The source is on http://www.bennadel.com/blog/122-Getting-Only-the-Date-Part-of-a-Date-Time-Stamp-in-SQL-Server.htm, where you can find other smart ways to do it. I found this was the easyest for me.
This is one of the most annoying errors that you now is easy to handle, but always have to google the sollution, because you don’t remember what you did last time to get rid of it.
Stop checking the C# code, the problem is not there. Just remove the quotes from the query string in the stored procedure and it will work just fine:).
I had to write an application where I used a DataGridView with various DataTypes columns. For the dateTime column I used a Calendar Column, but for the Int32 columns, I wanted to display a message that would say to the user that they inserted some wrong data. I have found an example on http://www.codeguru.com/forum/showthread.php?t=418306 , but the example is in VB.NET. I wrote something in C#:
private void callOnEdit(object sender, DataGridViewDataErrorEventArgs e){
try
{
switch (e.ColumnIndex) {
case 1: MessageBox.Show(“Message.”);break;
//and so on
}
}
catch
{
MessageBox.Show(“Message!”);
}
}
To use this, you only have to go in the Events panel for the DataGridView and set the DataError event to be handled by this function.
Please note that in VB.NET you can use “Handles”, but in C# you can’t. This is why:
http://www.velocityreviews.com/forums/t367616-using-quothandlesquot-vb-vs-c.html