I'm trying to use a variable in a query similar to the following
Query1.SQL.Text := 'SELECT name FROM Table WHERE Value = :MyVal';
Query1.ParamByName('MyVal').Value := EditBox.Text;
My problem is that if Value is an integer then my Query won't accept the value and will give me an error. I'm not sure of the best solution to this I think I need to check the type of 'Value' and assign the variable MyVal a value based on the type. Is there a way I can check the type of a particular field in a db?
I'm getting input from EditBoxes and using it similar to above for things that should be integers I only want to have users able to enter numeric data into the field or check whether what they entered is a number before I assign the value to my query is there a function that does this?
3) if Value above in part 1 is a string and the text in my EditBox contains apostrophes do I need to edit the field at all so that the Query doesn't directly interpret the apostrophes.
Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT
This article explains how to create forms/units independent of other forms/units object names in a delphi project.
Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview. I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…