samedi 25 juillet 2015

Get Integer as a string so I can parse it to integer? SQLITE

When I try to get an Integer from my SQLite db I can only get it working by reading it as a string and then run int.parse on it. Is this right, I read something about this having to do with execuleScalar possibly giving back null?

Here is my current code SendSQLExecScalar() sends the command string etc. and return an object

int ID = int.Parse(SendSQLExecScalar(C).ToString());

Aucun commentaire:

Enregistrer un commentaire