-
Content Count
99 -
Joined
-
Last visited
-
Days Won
1
Everything posted by weirdo12
-
Send multiple attachments with smtp.office365/outlook.com
weirdo12 replied to weirdo12's topic in Indy
Thanks, Remy. That's the answer I expected and what I had already told the customer. I really hesitated asking the question but thought I better before telling the customer they'd need to contact Microsoft. -
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connect_to_Firebird_(FireDAC)
-
If you use a suitable column type alias in your SQLite table definition, FireDAC will figure out the correct field data type to use. DATE | SMALLDATE dtDate DATETIME | SMALLDATETIME dtDateTime TIMESTAMP dtDateTimeStamp TIME dtTime https://docwiki.embarcadero.com/RADStudio/Alexandria/en/SQLite_support_in_RAD_Studio
-
Do you need to store exit_time value as INTEGER or would you prefer it stored in a format that you can read (like yyyy-mm-dd)?
-
If you do want to use the latest version of SQLite, make sure to change the EngineLink property of your TFDPhysSQLiteDriverLink component to slDynamic and put the SQLite DLL in the same directory as the application exe.
-
How can I extract a row's data from a TMyQuery object ?
weirdo12 replied to dormky's topic in Databases
To use the example as shown, DataObject would be a type that has an overloaded assignment (Assign) operator that accepted a TDataSet (or TFDQuery or whatever). In Assign you would copy the data you want to the members of DataObject. https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Operator_Overloading_(Delphi)#Declaring_Operator_Overloads -
Store a large number of images in the filesystem or in a DB?
weirdo12 replied to RaelB's topic in Databases
Have a look at SQLite as Anders suggested: https://sqlite.org/appfileformat.html -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
Was that meant as a dis of SQLite - did I read that right? -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
If you are using components built specifically for Interbase/Firebird (or some other server) - absolutely. -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
Okay that is a good reason to stick with what your using. -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
Would you consider changing to SQLite? I know it might be a huge deal if you have a lot of database specific dependencies in your code so it might not be practical. -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
Someone would have to write an IDE plugin. -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
No, I would say the file is already in use. Maybe you have no choice but to make sure the IDE closes the connection before you run your app. The IDE and your app can't both use the file. That's a different problem and it won't be solved by ConnectedStoredUsage. But if your want you app to always start with the Connected = False outside of the IDE it will make sure that happens. -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
Please try using the ConnectedStorageUsage property and save yourself all that hassle. You can have you cake and eat it too. Just uncheck uaRunTime and the TFDConnection.Connected property will never be True at runtime even when you save your unit with it set to True. -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
I'm glad you gave it a try! -
FireDAC Create table with TFDTable class at SQL Postgres 14
weirdo12 replied to shalapai's topic in Databases
This works in RAD Studio 11.3 with PostgreSQL 14.8 running on Ubuntu. Without the SET search_path code, the table is always being added to public even if SchemaName was set to dba or if the TableName was qualified like dba.test_table. std::unique_ptr<TFDTable> vTable(new TFDTable(0)); vTable->Connection = db_connection; vTable->TableName = "test_table"; vTable->FieldDefs->Add("login", ftLargeint, 0, true); vTable->FieldDefs->Add("ticket", ftLargeint, 0, true); vTable->FieldDefs->Add("exec_time", ftDateTime, 0, true); vTable->FieldDefs->Add("req_price", ftFloat, 0, true); TFDIndex* idx = vTable->Indexes->Add(); idx->Name = System::Sysutils::Format("%s_pkey", String("test_table")); idx->Fields = "login;ticket"; idx->Active = true; db_connection->ExecSQL("SET search_path TO dba, public"); if (!vTable->Exists) { vTable->CreateTable(False); } db_connection->ExecSQL("SET search_path TO public, dba");- 18 replies
-
- create table
- tfdtable
-
(and 1 more)
Tagged with:
-
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
If both of those are False the state of Connected will be ignored. You can test this by setting Connected to True, saving the file, closing it and reopening it. Connected will be False. Or create a new app. Drop a TFDConnection component on the main form. Set DriverName to SQLite. Add a BeforeConnect event handler. Put some dummy code in it so it does get deleted because it's empty. Set a break point on it. Set Connected to True. You should get prompted for a password. Click OK. Now run the app. The breakpoint won't occur. Now check auRunTime. Run the app again. It will break at the BeforeConnect event handler. -
Trap TFDConnection error on data module create etc?
weirdo12 replied to Chris1701's topic in Databases
There is an TFDConnection property that you can set to tell it how use/save the state of the Connected property - ConnectedStoredUsage. -
FireDAC Create table with TFDTable class at SQL Postgres 14
weirdo12 replied to shalapai's topic in Databases
Did you try including the schema name with the table name? vTable.TableName:='test_schem.test_table';- 18 replies
-
- create table
- tfdtable
-
(and 1 more)
Tagged with:
-
FireDAC Create table with TFDTable class at SQL Postgres 14
weirdo12 replied to shalapai's topic in Databases
If you use the public schema does everything work as expected? I just want to confirm that. I am assuming it does. You don't assign any value to SchemaName and everything works. Or do you assign 'public' to SchemaName?- 18 replies
-
- create table
- tfdtable
-
(and 1 more)
Tagged with:
-
Nice. The only issue would be if any of the columns is NULL.
-
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
weirdo12 replied to Jasonjac2's topic in Databases
Have you tried this setting? It's just a shot in the dark. -
Or: SELECT SUM( if( (if(col1 = 'True', 1, 0) + if(col2 = 'True', 1, 0) } + if(col3 = 'True', 1, 0) ... ) > 0, 1, 0) ) AS "Some Columns Have True Strings" FROM ...
-
How about: SELECT if(col1 = 'True', 1, 0) + if(col2 = 'True', 1, 0) } + if(col3 = 'True', 1, 0) } ... AS "Sum Of True Strings" FROM ...