Archive for the ‘.NET Timecard Project’ Category

DOS Reports using Foxpro 2.6

The code below i believe is useful in my program.

if (System.IO.File.Exists("d:\\pepesfile\\rd-png\\fpd26\\foxprox.exe" ))
{
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.WorkingDirectory = "d:\\pepesfile\\rd-png\\hrdpayroll\\";
proc.StartInfo.FileName = "d:\\pepesfile\\rd-png\\fpd26\\foxprox.exe";
proc.StartInfo.Arguments = "main.app";
proc.Start();
}
else
{
System.Windows.Forms.MessageBox.Show("Wala...");
}

More on SQLite Backend Discussion

I found some odd instruction in the SQLite 3.0 version.
The following works properly in PostgreSQL

SELECT * FROM totp WHERE wk BETWEEN DATE '1980-05-20'
AND DATE '1980-05-26'

and its equivalent in MS SQL is :

SELECT * FROM totp WHERE wk BETWEEN '1980-05-20'
AND '1980-05-26'

while on the SQLite its equivalent of this is :

SELECT * FROM totp WHERE wk BETWEEN date('1980-05-20')
AND date('1980-05-26')

SQLiteAdmin

I’ve downloaded last the sqlite admin. It looks like a query analyzer of MS SQL and pgAdmin of Postgresql. Nice I’ve enjoyed using it and I’ve been importing some of my necessary data for the payroll program using CSV format.

progs

sqliteadmin2
the ghostly logo :P
sqliteadmin1

and other logo

Notes on SQLite Data Provider

I’m using Finisar namespace as my data provider for SQLite Database in the Timecard program. The only problem I have is that unlike the other database managers like Postgresql, Mysql and MS SQL, it doesn’t have an inherent date computation program.

If my solution wont work, I will then resort to ADO.net and row by row I’ll compute the interval of each date on that data.

This is the result of the new code. More complex than the normal coding in SQL Server, but I guess it solves my problem.
sqlite> select (strftime('%s',pmend)-strftime('%s',pmstart))/3600 as t1,pmstart,pmend from vwdtsdetail where dtsdetailid= 20;
5.5|2006-04-19 13:00:00|2006-04-19 18:30:00

Another thing that i observed in sqlite is that the function strftime wont work if the datetime format doesn’t appear like this : yyyy-MM-dd HH:mm:ss
and the date format is : yyyy-MM-dd