Convert Access table to .ini file with schemas via Vb.net - vb.net

I was wondering if this is something thats possible: currently I use this clickonce application to generate .ini files of access tables, I started learning vb.net not too long ago and I was wondering if I can replicate this utility via a vb.net form/app? Since currently not all the users in my company can use this utility for whatever reason by upper management and I looked around this site and other places, I found resources on how to create schema .ini files but what if the schemas are already in an sql table?
So for example each type of client has a code and schema type in our sql tables with "pick up locations", we use this in the click once app where I can select the access db, the table, and the location to drop off the created .ini file.
Currently in the sql, I have all the schemas in the schema table that has 3 different schemas and we tie the clients to one of these with each schema having different field order, length, type etc.
I want to be able to create a form and the user would be able to input the location of the access db and the table to be converted, then the client name (from a drop down) and based on the client the vb.net app would generate the correct schema ini file in the location for that client. Is this possible? I just dont want to keep looking into something if its not something achievable. Any information is greatly appreciated thank you

Related

Transferring specific data from one db to another locally

Ok here is the situation. We have a client application that contains a local sql database. At any given time, they could be working in the field and may have no internet connection at all. This means they cannot sync back to the server or to anything else. Client A needs to export specific pipe information that will include data from several tables and will have to hand off this information to Client B that will continue to work on this. Client A will then need to put this information on a file and give to Client B. Client B will then need to import this pipe information into his local database.
I'm brainstorming for ideas of what could be the best solution to accomplish this?
So far querying the specific pipe information, writing to a file in xml and then importing the xml and writing to the database could be an option.
Or just querying the information and writing sql scripts that can be executed on client Bs machine.
We just can't export the entire databases information from one computer to another. It has to be only specific information the user wants to export.

form a database out of .txt file

I have a .txt file with rows of the following format
SI1334596|MRKU3|High Cube|1|EGST|First Line|Vehicle one|25|13|
How do I form a database of above .txt entries to perform SQL queries on it? I also want to assign column names to each of the columns. I have little or no knowledge on importing txt file entries in a database. I am looking for a software which can be installed on my windows computer which can import .txt file and convert into a database and allow me to perform queries thereafter.
If you are asking for recommendations on specific tools, then your Question is off-topic for StackOverflow.com. See the Software Recommendations Stack Exchange.
Here are some possible approaches, with and without programming.
Database Import
Databases often have a built-in command or facility for importing data straight from a text file. When directly importing text with little or processing, the import is often very fast.
For example, Postgres has the copy command to import. This command includes a parameter DELIMITER where you can tell it to expect the vertical bar | as the separator between fields.
You would define your table structure ahead of time, before the import, defining a name and data type for each expected column/field.
Custom App
You can write an app to read the text file, process the incoming data, and feed the prepared data to the database. For example, write a Java app that reads the text file, uses JDBC to connect to the server, and SQL written as text strings to instruct the database server on what to do.
You can do this row by row. Or, for increased speed, you can write a batch statement telling the database server to create multiple rows at the same time.
This is the way to go if the data requires complicated processing or there are other related chores such as keeping a history of many such imports, logging other information, reporting duplicate data, and so on.
For Java, the Apache Commons CSV library helps with reading/writing plain text files.
Spreadsheet
Many spreadsheets, such as LibreOffice Calc, can parse the data, deduce the column headers as titles, and populate a spreadsheet. You can do queries within the spreadsheet. Works well for smaller amounts of data that can comfortably reside within memory. You may not need a database at all.
Database Tool
SQL database engines such as Postgres, H2, SQLite, and MySQL/MariaDB are just black-box engines not full-blown interactive data tools. You can obtain such tools that connect with these engines. This tools can import/export text files, display lists of data, let you enter/modify data, create forms for better access to the data, and generate reports.
But there are some such data tools that have a database engine built-in. Examples include:
FileMaker
4D
LibreOffice Base

User accessing database files in SQL Server

Is it possible in SQL Server to find which users writing data in database files? For example: there are two users SA and microsoft\thomas on an instance. ABC database is accessed by both the users and it has three files ABC1.mdf , ABC2.ndf and ABC3.ldf . Can we find who is writing how much data on which files?
I need to to track users writing heavily on the databases as the disks become full because of them.
So i think its not possible to track which user writing how much data and on which data files.

Duplicate Schema in Sql Server 2008

I am wanting to duplicate an existing schema with the table structure, but not any of the existing data. Essentially, we are separating two companies that currently share a single schema in the database, and they have the exact same data structure, but we want them in different schemas (for access control purposes).
It is possible to copy the entire table structure of one schema into a new schema without bringing over any of the data?
You can do that in SSMS (Sql Server Management Studio)
Right-click on the database
Script Database as
Create to
File
Do a global search-and-replace in the resulting file, changing your schema name to their desired schema name.
I suggest going forward that you maintain change scripts to apply any needed changes to the DB as the application is further developed. That way, you can just share the change scripts and each apply them when you are ready to upgrade the app version.

Can't relink mdb file with Linked File Wizard

So, I've got an access database that I want to open.
I can see the querys/forms/tables exist but when I want to open them it tells me
"X:[...]\database.mdb" is not a valid path. Of course, because this is my computer. So when I select them to relink them in the wizard, I select the current database file and it just tells me, that the query/form/table doesn't exist in there and I should check the name.
But I am in that database and I can see those forms exist. The database itself is just around 1mb, is there something msissing maybe? Don't think so, huh.
It looks like your Access database project has been split into Front-End and Back-End databases.
This is normal practice for an Access database project of any significant size.
It seems you have the front-end database - this is the one containing the forms etc. Yes, it will list the tables but all those tables are just links. The underlying data is not in this front-end database, but in the back-end.
If your tables are shown with a small arrow then these are linked tables and a sure sign you have a front-end database:
When you fire up the Linked Table Wizard you need to browse to the back-end database, not the current database. If you cannot locate the back-end or no longer have it, then basically, you have no data. Your front-end database may be of little value on its own.