Im building a receipt which are sent to a receipt printer through ESC/Pos. If I later on need to print out a copy of that receipt I need to store the esc/pos commands in a database. This is where my problem starts because I cant find a proper datatype to store the receipt in.
How do you store your receipt copies? Strings? Varbinarys? Anything else?
UPDATE: Im sorry. I wrote a fast example of how ESC/Pos works.
Encoding enc = Encoding.ASCII;
string text = string.Empty;
text += Convert.ToChar(27) + "@";
text += Convert.ToChar(27) + "R" + Convert.ToChar(9);
text += Convert.ToChar(27) + "t" + Convert.ToChar(5);
for (int i = 255; i < 300; i++)
{
text += i + " " + Convert.ToChar(i) + Environment.NewLine;
}
for (int i = 0; i < 4; i++)
text += Environment.NewLine;
text += Convert.ToChar(29) + "V" + Convert.ToChar(65) + Convert.ToChar(0);
clientSock.Send(enc.GetBytes(text.ToCharArray()));
This is what I want to store. I dont wanna save just the content in the text-variable since I would loose the format that might be included in the content. Im using Microsoft SQL Server (T-SQL).