Line 30 (with the cs).
Main Topics
Browse All TopicsI want to try to create a ms access database in realtime with delphi, and I used the example on about delphi (http://delphi.about.com/o
[DCC Error] test1.pas(68): E2010 Incompatible types: 'TStrings' and 'string'
This is related to the cs in the code.
So here is what I want to do, Form.oncreate I want the app to create a ms access database (with table and columns), then get it filled from the online database (I'll look into that, so that's not my question).
My question is howto create a database in realtime.
Thanks in advanced.
Here is the code I use at the moment.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
It's very simple to create a empty Access-Database (*.mdb File) using OLE. It's not necessary to have MS-Access installed on your computer. If an exception occures the error message will returned. After creating the DB you can create Tables with simple SQL-Statements.
uses comobj,sysutils;
function CreateAccessDatabase(FileN
var cat : OLEVariant;
begin
result := '';
try
cat := CreateOleObject('ADOX.Cata
cat.create ('Provider=Microsoft.Jet.O
cat := NULL;
except
on e : Exception do result := e.message;
end;
end;
Thanks, how can I get all the records from my online database into the ms access database just created?
I know I can do that with an SQL query
I've looked on the internet for a good tutorial, but the ones I found where from table1 into table2 in the same database and what I want is total different.
Hope you can point me into the right direction?
Thanks in advanced.
I neglected to ask why you want to do this. Are you migrating from online to Access. If not you don't need to copy records, you can just link Access to the online table(s).
IMHO the easiest way to copy the records is to open the Access database, link to the table(s) and run MakeTable query(s), or to import them.
I'll be willing to answer your question. The app I'm creating can't run if there isn't a connection to the online database (no internet, I know it's almost impossible), but still if it happends, then the app can connect to the latest database (with most updated records in the ms access database (they don't update that fast).
About your last part. Is there an example, because looked on the internet for an example but couldn't find anything yet.
Thanks
How To Export and Import Access Tables Using DAO or ODBC:
http://support.microsoft.c
dont know why you people create components on the fly...for what reason or purpose?If you got' to have it you got' to have it.So just use it...Just drop 2 adoconnections,adotables on the form and one queery.
Link 1 connection to server and the other one to your application.
Link table1 to server.songs other to local.songs and just bang the queery to copy/append from one table to another.
For the server connection I usually use a function (which checks the connection) as usually the server is the one giving hard time.If server has no connection everything else is pointless.So care must be taken in connecting to server,
Good practice is to use TRY FINALLY EXCEPT with logging to text file.
Npwdays to connect securely to server is a real pain in the ass.Bypassing firewalls is a nice sport.I busted my balls one afternoon just to find NOD blocking my connection.
Sorry I'm still kinda stuck, do you maybe have an example (the link you gave me to the microsoft site, was not really clear, sorry).
I've change the connections (names) so I can't make a mistake on which is the source and which is the target, hope you can help me, I'm soft of on a tight schedule.
Here again the whole code I use at this moment (hope you can make something out):
Thanks
Business Accounts
Answer for Membership
by: ramromPosted on 2009-09-07 at 05:46:46ID: 25274659
Could you tell us which line of code raises the error?