I've been trying to create a program that creates a database, creates tables, stores information in these tables, and reads off these tables. I am using delphi and microsoft access (although I am open to using another database program if one is easier to learn). Anyway, I cam across this question and answer: Delphi 7: ADO, need basic coding example
However I am confused about what my connection string would be or how to know what is is. I want the database saved in the same file area as where my program is so would it just be the file directory to that area such as:
FILE NAME=E:\project\Debug\Win32\Studentdb.accdb
Also the user uses +database. If my database name is Studentdb would I just put 'Brill1' in that space or not?
Also do I need to use ODBC connector if I am not using MYSQL? I am guessing not but do I need to use something else. Also, while saving files from microsoft access they save as .accdb however when I created a ADOConnection component on my form and pressed into the connection string property it was asking for a .udl and I haven't run across this anywhere before so I am wondering if I need to convert or do something with that.
I am a real beginner with this so I am sorry if my questions are obvious but I would really appreciate some help or pointed to a beginner's friendly resource on the subject. Thank you.
All possible connection strings from Access 2007 are here:
https://www.connectionstrings.com/access-2007/
...which one to choose depends on which driver you have and/or want to use.
(ACE, OLE, ODBC ...)
Related
Preface
I created an Information System using Visual Basic for our office in our school. It uses OleDb Engine for an Access Database. The database is stored inside the directory or locally inside the application thus making the connection string:
"PROVIDER=Microsoft.ACE.OLEDB.12.0;Data Source = DATA\Base\database.accdb;Jet OLEDB:Database Password =cca"
The Information System makes the job done on printing, reporting, adding, deleting and editing records.
What I'm Trying To Achieve
Now I need to make the database accessible ONLINE or REMOTELY by making an unused PC be a server instead. This is the overview of what I'm trying to achieve:
and the connection string will be like (or SOMETHING LIKE)
"PROVIDER=Microsoft.ACE.OLEDB.12.0;Data Source = (address of the server, something like) 10.212.19.3:1234\CCA-SERVER\My Documents\database.accdb;Jet OLEDB:Database Password =cca"
telling the system that it will access the database in an address online and on a specific server. Or something like, I will just put the database inside the server and through the internet it will be easily be accessed by the system like a Shared Location inside a network. If so, How can I do it? Where do I begin?
Question Conclusion
I'm trying to make a database server. We have a desktop server ready to run. I'm currently digging Google for information and guides how to make it but all I see for now is bumped threads and searching alone won't fill me enough so I decided to ask you guys if you know any
Guides.
Links to any resources.
Tips on where should I start.
Links to Tutorials.
Tools I'll be needing for the process.
NOTE: I'll update this if ever somewhere in the internet provides a
good guide/tutorial for what I'm trying to achieve and I'll put a link
to it incase someone in the future will ask the same question as I
did. For now, I'm asking for your help and brief me what I should do step by step.
Thank you.
I am trying to setup the RoundHousE project in my application to handle the database migration and version handling. I am following this article. It is fine as far as I know the database name exactly.
But I am not able to find, how should I handle the dynamic name of databases, because in my application I have separate database for each client, and list of these databases in a table in my main database. So name goes like: client1_db, client2_db etc.
Any solution or pointer towards the solution will be a great help.
A pointer towards the solution - The wiki https://github.com/chucknorris/roundhouse/wiki
Asking about passing the database name dynamically is a bit weird to me as when you run rh.exe or use the embedded DLL, database name is one of the required arguments. So you always have to pass the name dynamically. See https://github.com/chucknorris/roundhouse/wiki/ConfigurationOptions#main-stuff
Reading and trying to understand what you are asking, it seems you have a list of database names in a main database somewhere that you want to give to RoundhousE? To do that you would need to create something custom that can gather the name of the database(s) you are looking for and provide the result to RoundhousE.
I'm in the unlucky situation where my client requires to use a read-only MS Access database to render some webpage contents on his website (built by me).
Because this MS Access file will be updated roughly once per month and I don't want to do it manually by converting it into sql query and import in Mysql, I would like to make some webpages read directly from it.
What I discovered is that there isn't a driver (at least in my cakephp installation) for MS Access database (but in older versions of cake exist) or at least I didn't find any of them.
I need to know where eventually I can find such drivers or how to correctly implement one of them only for read operations (I think I should implement DboSource class, but I don't know what should I override because there isn't anything such virtual or abstract or interface that guide me through this).
I didn't even understand if I should create an Adodb driver or an OleDB driver. I also think that Sqlserver driver is a lot similar to what I should build (except for connectionand some details); if I can use it in some way to shorten my job, it will be helpful.
Edit 1:
Because no one is answering, I can say I'm ok to use MS Access also with "normal" queries (without requiring each table to be bound to a model) but I must be sure that are sanitized and will output arrays similar to what cakes output actually: $jobs['jobs']['name']
Any suggestion on how to achieve this?
Maybe the Adodb or Odbc datasources from https://github.com/cakephp/datasources/tree/2.0/Model/Datasource/Database work with MS Access?
This example is to big to write here it-s from cake bakery Please test it and i'm here for other problems
Ok, I know this has been asked a thousand times before, but no conclusive solution has been derived...so here is another really silly question!
I have a Winforms 3.5 app and using LINQ to SQL, hence the Connection string is ALWAYS stored in "app.config" by default (and VS2008 will not accept any other way of storing this - Ive even tried overwriting this in the IDE-generated code). That being said, any person with a bit of computer know-how needs to just browse to the install directory of the app, look for the [appname].exe.config file, and open it to reveal the supposed secure username/password for accessing the database. Even if you opt to encrypt/decrypt this section, it is only done when the app is running - so Im assuming that when the app is closed, the connString section reverts to plain text....that can be once again read. (....how do you win?!?!)
Keeping in mind that Im using LINQ and generating a LinqDataContext, what I would like to know is this:
Can the connstring not be stored elsewhere besides the app.config? (perhaps like in a user setting file that can be modified after installation)
If the above is possible, can I not store a pre-encrypted connstring into the config file (that certainly wont be able to be read) and in my application, opt only to decrypt the connstring whenever the connection is opened?
If none of this is possible, I may have to revert to using traditional ADO.NET (seeing that I already have hundreds of stored procs for all CRUD operations) - at least that way I can have control over how and where the connstring is stored.
BTW - sorry if this is a juvenile/confusing question to ask, and if you feel that Im wrong with anything Im explaining please let me know.
Much thanks!
You can store a pre-encrypted conn-string in the app.config, but i guess it will be useless since, your application sooner or later will decrypt the conn-string (And the plain text will be availiable to anyone interested!)
So you should obtain an SSL cerificate too... (Not a self signed one)
How do I read and write a file using a file format which is readable by a database server, in vb2008?
I have very little experience working with databases, and I can't seem to find any tutorials which don't involve some type of server as a middle-man.
It's really going to depend on which type of database files you are working with. If you have an Access Database file, you can open a connection to the database with the following code.
Dim DBConn as New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDBFile.mdb;")
If you don't want a server, use SQLite. There are .NET bindings that work quite nicely.
Reading and writing the raw database files would be an immense undertaking -- if you have to ask how to do it, you shouldn't. It requires so much work that it's not even worth considering for a moment.
In general, most database-aware software writes to the database using a software library adapter. Like ODBC.
What you might be looking for is the file format that a bulk loader can understand. Something like this (MySQL example).