CIniFile: Difference between revisions
m
Sets _not_ Gets!
m (spelling!) |
m (Sets _not_ Gets!) |
||
(One intermediate revision by one other user not shown) | |||
Line 105: | Line 105: | ||
// Set the properties to make the information persistent | // Set the properties to make the information persistent | ||
Set psServer to sServer | |||
Set psLogin to sLogin | |||
Set psPassword to sPW | |||
Set psDriver to sDrv | |||
Set psDatabase to sDB | |||
Set pbDoLogin to bDB | |||
</source> | </source> | ||
Line 117: | Line 117: | ||
You could save some code by not retrieving the properties into local variables first, but using the properties as defaults directly: | You could save some code by not retrieving the properties into local variables first, but using the properties as defaults directly: | ||
<source lang=" | <source lang="dataflex"> | ||
Move (ReadString(hoIni, "Database Login", "Server", psServer(Self))) to sServer | Move (ReadString(hoIni, "Database Login", "Server", psServer(Self))) to sServer | ||
Move (ReadString(hoIni, "Database Login", "Login", psLogin(Self))) to sLogin | Move (ReadString(hoIni, "Database Login", "Login", psLogin(Self))) to sLogin | ||
Line 128: | Line 128: | ||
Or even dispense with the local variables completely: | Or even dispense with the local variables completely: | ||
<source lang=" | <source lang="dataflex"> | ||
Set psServer to (ReadString(hoIni, "Database Login", "Server", psServer(Self))) | Set psServer to (ReadString(hoIni, "Database Login", "Server", psServer(Self))) | ||
Set psLogin to (ReadString(hoIni, "Database Login", "Login", psLogin(Self))) | Set psLogin to (ReadString(hoIni, "Database Login", "Login", psLogin(Self))) |