My Home Brew TITO program

(1/15) > >>

Foster:
I have been working on my own TITO program

All coded with VS 2010 C#
I get any tilts from machine and can redeem any ticket (right now hard coded for a specific amount) until I figure out how to access my SQL Table that I will use for tickets

Table
VoucherNumber    BigInt (same as Long) primary key
Issue Date            DateTime
Redeem Datge      DateTime
Redeemed            Int          (0 not redeemed) 1 redeemed
  I cant find a Boolean variable in MS SQL Express


I wish the built C# SerialPort Class and underlying code was not buggy.
I thought I found a decent one but it even has issues.

stayouttadabunker:
Sounds like a great winter project Foster!  :3-
Keep it up! K+ to you!
I hope you succeed and if there's anything that the slot community can do to help you - let us know!  :89-

Foster:
Yeah find me a free or very low cost C# Serial Port class library that supports 9 bits!
I hate doing parity flipping to make this work.

Also I can see why AndyP App had timing issues or not working with some serial ports.
Mine wont work with a standard serial port only a USB to Serial Adapter.

crgadyk:
It won't make a huge difference but you can use a BIT data type for your boolean instead of storing an INT. A bit is just 0 or 1 (typically people treat 0 as the false and 1 as the true).

You could also use a tinyInt but even that is using more storage space than a Bit would. And depending on which version of SQL server you are using, you have some flexibility with the dates as well. In SQL 2005 or below, you just have a DateTime which is the standard, but with 2008 and above there are several more options. You can do with just Date or Time (which really helps in date comparisons) and you can also use a DateTime2 which goes down to a finer level of granularity in the time. And not that it matters, but it will work for older dates (pre 1700) and for future dates.

zarobhr:
Quote from: Foster on December 21, 2011, 09:52:42 AM

I have been working on my own TITO program

All coded with VS 2010 C#
I get any tilts from machine and can redeem any ticket (right now hard coded for a specific amount) until I figure out how to access my SQL Table that I will use for tickets

Table
VoucherNumber    BigInt (same as Long) primary key
Issue Date            DateTime
Redeem Datge      DateTime
Redeemed            Int          (0 not redeemed) 1 redeemed
  I cant find a Boolean variable in MS SQL Express


I wish the built C# SerialPort Class and underlying code was not buggy.
I thought I found a decent one but it even has issues.

foster you can use Bit in Sql. when writting that filed to the database you can write it using true false

Navigation

[0] Message Index

[#] Next page