Firedac / Anydac query issue when using updatesql components - delphi

The following question is related to firedac using adquery, updatesql with access database:
First the scenario:
In one of scenario my updatesql gives an error i-e data in the table was not updated, however my dataset after showing error moves to next record. But now data is not in sync with table grid, which is based on this dataset*(adquery)* show updated version which was not successfully applied.
Yet the table still has the old version of the given record.
And my question:
If an error occurs during modification how to know that modifysql
was not run successfully and trap that error to refresh the dataset
as per data in table?

Related

How to select particular database using InfluxDB web user interface

I am using InfluxDB and caught up with interesting situation. I have created around 20 plus instances of D.B. as shown below.
Now, some of the Database names are not showing as they are way down below in the drop down list. I did apply zoom in, reducing font size, giving name of database so that they can come up at the staring of the list, but these all are temporary solutions. Wondering how to scroll database list or select specific database using some InfluxDB command?
InfluxDB version i am using is V 1.2.2
You can do either of these:
Issue a SHOW DATABASES query to gather the list of your databases
Prefix with the database name, e.g.
SELECT * from DATABASENAME..MEASUREMENTNAME
to query a specific database

Data Refresh From Database when using TADOQuery, TClientDataSet, TDataSetProvider in Delphi

I have a TADOQuery connected to a database, and sql set to fetch data.
TDataSetProvider to the above query
TClientDataSet connected to the provider
TDataSource connected to the Data set
Data source connected to a TcxGrid
The Client Data Set is also connected to a master source, that in itself is connected to a table.
I am able to add and delete to grid as expected (grid cannot be edited directly, all people can do is add or delete). I am using delete and append on the data set to control the grid.
What is strange and I cannot solve is that when I change what record is being used in the master source grid, and then go back to the original record the data is being refreshed from the database or some stored original state of data set, rather than the in-memory data set.
So if I had deleted a record, it reappears, and any still existing ones are duplicated, though anything added from last save to database is not duplicated. However if I do an update on the data set to the database, the database table is how I would expect. No duplicate records, anything deleted via grid/data set is deleted, anything added is added.
I suspect this is a really trivial flag setting, but I cannot find this, and every query others have seems to be about refreshing the data, not preventing it.
Any suggestions would be appreciated.

Fusion Tables: Unable to complete import

I've been using Fusion Tables for about a year off and on. Today on attempting to upload a 156kb file, it comes up with 'Unable to complete import'.
I tried reducing the size, then realised most of the other files i'd uploaded were larger, so out of curiosity attempted to upload a previously uploaded file (already stored as a fusion table).
This also fails. I've tried uploading on another account and this also fails with the same message.
Is there anyway to check to see if there is an issue with Fusion Tables? I've read previous questions and those unrelated to size mention an issue with Fusion Tables, or alternatively if there is a way of getting better error reporting from the attempted upload?
Resolved by Google. No changes were made/no reboots today, but fusion tables are working again.

Cannot update model after adding stored procedures to database

I am working on a MVC 4 application.
Using Entity Framework Database First design paradigm.
My database is in mySQL, on a remote server.
I am using the mysql connector 6.6.5.
I am using Visual Studio 2012 with updates installed just two days ago.
The problem: I created my tables and then generated the model. After that I created some stored procedures and then updated my model by rightclicking the model diagram and then selecting "Update Model from Database"
In the next dialouge box I then select my new stored procedure. But some stored procedures are not being generated in my model. (I cannot see them under Function Imports in the Model Browser.). Even if I generate the model one more time, no success.
For stored procedure I get this error when generating model:
An exception of type 'MySql.Data.MySqlClient.MySqlException' occured while attempting to update from the database. The exception message is 'No data - zero rows fetched, selected or processed'.
Funny thing is I tested the stored procedure from MySQL workbench. The stored procedure works as expected.
Please help!

SQLite3 and Refresh after deleting a record?

two hours of searching and reading and I am no closer.
Using D5, Zeos v6 SQLite I have Table with the rows displayed in a DBGrid. All fine.
I use
DELETE FROM tblOne WHERE Acct="FirstEntry"
and it deletes the only row that matches. Still all fine - but the DBGrid display stays the same still showing the row just deleted.
I read that closing and opening the TTable assigned to tblOne will refresh the display (as will tblOne.Refresh) which is fine for this test, but sometimes I will not know which Table it is, all I will have is the Table Name. There is no "OPEN", "CLOSE" or "REFRESH" command in SQLite that I can find.
So, how can I refresh the DBGird display to show the record has been deleted?
(edit)
I know I can use
dbgrid1.DataSource.DataSet.Refresh;
but, how does one refresh a display using SQL statements? Or is it not possible?
(edit)
A short line of code would help to describe the process.
Thanks

Resources