Jump to content

Nathan Wild

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

1 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Nathan Wild

    Automatic Assignment Of NOT NULL Defaults

    Oh yes, of course... I was just hoping that there was a way to do this somewhat more automatically...
  2. I am working with a table that has a large number of fields which are ALL set up as NOT NULL. 90% of these are unused, but need to be populated when inserting new records. Is there an easy / automatic was to tell FD to automatically populate '' and 0 values as appropriate for data type when inserting new records?
  3. Nathan Wild

    SQLBindParameter error with TFDQuery / ODBC

    Lovely... but where does that leave those of us who only have 10.1? 😞
  4. Nathan Wild

    SQLBindParameter error with TFDQuery / ODBC

    So what is the best approach to do this? My end result is that I want to allow the end user to input a key value and then pass that to a a query as a parameter. This works perfectly the first time, but when I close the query, set a new parameter value and then re-open the query, I get this "SQLBindParameter has not been called for Parameter #2" error. Sure;y clearing and re-setting the entire SQL statement is not required?
  5. Is there an easy way to see EXACTLY what query FireDAC is passing through to my database server? After it does all the parameter substitutions, and automatic jiggerey pokery? I've had a few weird errors and I think being able to see this would be very helpful.
  6. Nathan Wild

    Strange thing in System.Generics.Defaults.pas

    That made my day 🙂
  7. Nathan Wild

    Detailed logging (for debugging)

    Another vote for CodeSite. I've been using a simple collection of functions that wrap it's behavior and it is an excellent, maybe even essential, tool for client-side debugging!
  8. Nathan Wild

    Solved: Application Run Check and bring to foreground

    Not sure if this helps, but the TJvAppInstances component in the JEDI VCL collection handles this quite nicely.
  9. Nathan Wild

    SQLBindParameter error with TFDQuery / ODBC

    I will try this! Any idea why it would fail with that error when I call fdquery.Refresh()?
  10. I am at a loss to explain this, but it feels like I am missing something obvious so I thought I would try here... If I have a query that does a simple select * with two parameters it works properly. If I modify the underlying table with another query, and then attempt to call .Refresh() or to activate and deactivate the select query I get a FireDAC ODBC error stating that SQLBindParameter has not been called for parameter #4. Firstly, there are only two parameters. Secondly, I don't ever call SQLBindParameter on anything. If I clear the SQL, and reset it, then reassign the parameters, it works fine? The exact error message is: [FireDAC][Phys][ODBC][Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]SQLBindParameter has not been called for parameter #4. Sample code: fdquery.Active := FALSE; fdquery.SQL.Clear(); fdquery.SQL.Add('SELECT * FROM MyTable WHERE Key1=:KEY1 AND Key2=:KEY2;'); fdquery.ParamByName('KEY1').AsString = 'value1'; fdquery.ParamByName('KEY2').AsString = 'value2'; fdquery.Active := TRUE; // This works fine. If I then execute an "INSERT INTO MyTable" query which generates data in [MyTable], and attempt to refresh the original query. I get the above error. If I set Active := FALSE and then back to TRUE again, I get that error. The only thing that seems to work is to clear and re-add the SQL, reassign the parameters, and then reactivate it. Questions: 1) Why is this error occurring at all? 2) Why is it coming up with parameter 4 when there are only two parameters to begin with?!
  11. This is something I struggle with a lot and there has to be an easier way?! I have many projects that have both debug and release configs for win32 and/or win64 targets. Is there a simple way to have the version information THE SAME across all of these? There config options for all builds, all targets, and all configurations, but no matter what I do they all appear to be maintained separately?! All I want it to be able to set my version info in the Project | Options | Version Info | All Configurations section, and have it JUST WORK...
×