ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Simple PC Usage Timer

<< < (7/11) > >>

Ruffnekk:
Using an SQL DB along with it is quite easy to implement. What I can do is expand the program to read some data about the server from another textfile or hardcode it. The program can then connect to the DB and set the field accordingly. I prefer the method of reading critical server data from a text file so that you can change these settings yourself in case you ever change the server or something. All the program needs to know is the server name, database name, table name and field name. I don’t need to know these things, you can enter them yourselves, but I do need to know whether I can use a trusted connection or a username/password combination?

fealeit:
That's excellent. My current db uses a username/pw. The external file would be ideal.

Ruffnekk:
On another note: the password which I used in the example is ‘john’ without quotes, just in case you can’t exit the program anymore :P

Another question about the SQL part: I assume you have multiple PC’s running, so what is the key in identifying the correct row in the table? Do you use the computername or some other ID I could get in the program?

fealeit:
Thanks. I did have a little trouble :)

I have four pcs called feale1, feale2 etc as their computer names.

But if I can specify the table/field name in sql, can't I just point each system to a different field?

Ruffnekk:
Yes you can, you can edit the text file on each PC and name the field differently. But for the SQL Update command I need to specify a WHERE clause, identifying the row to use. If the table has only one row then that’s not a problem though.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version