I have a collection of data stored in a FoxPro database in my local system . I want to use this data in my website . now I don't know what is the best way to use it .
1- to place the database itself in app_data and use VFP Oledb provider to extract data from ?
2- Or to use it as a linked server with my current sql server ?
3- or create a page that uploads VFP database then export it's records to a sql server database with the same schema ?
I can't answer these questions because :
I don't know how secure and scalable is a database placed in app_data /
is FoxPro database a good choice as a website backend data store /
exporting data from VPF to Sql database through code is not error proof ( I'm not sure if I lose records and FKs )
how often the data change? Do you need it real time? If yes, give it a try with linked servers:
http://support.microsoft.com/kb/199131
If you can have a X hours\minutes delay (that will depend on the size of your data), how about building SSIS packages to run on a regular basis to get the data from FoxPro and insert into a SQl Server database?
Visual FoxPro also has an upsizing wizard that will do the heavy lifting of converting your Visual Foxpro database to SQL Server including the table structures and data.
Related
My ASP.NET project is using SQL Server as the database. I am wondering if it is possible to store a temporary instance of my database so that I would only need to query once to work with the data that I need. For example, I will query the 2 tables, Person and Students with a common id. I want to be able to join the tables and use the information.
I think there are some solutions:
Store the tables in the front end and use ajax javascript to manipulate the tables information.
Store in a txt file or similar file on to the project folder as a pseudo database.
Would love to hear any ideas!
You could do worse than consider SQL Server Compact edition:
https://www.microsoft.com/en-za/download/details.aspx?id=17876
Which has a small footprint and supports private deployment of its binaries within the application folder
EDIT:
It seems CE is deprecated since last I used it. and MS now recommend SQL Server Express Local DB
https://learn.microsoft.com/en-gb/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-2017
And there is also SQLLite: https://www.supinfo.com/articles/single/6941-an-aspnet-core-mvc-app-with-sqlite-and-entity-framework
I am building a blog-like publishing system on ASP.NET 4.0 (with EF 4.0) that I want to be very easily deployable/backupable in the first place. I am at a decision point of whether making the system to create a database in an SQL Server and use that (traditionally), or have a App_Data MDF file in the site and just attach to that one with SQL Express. I know the memory/size limitations of Express editions, and I won't be hitting the limits as this is not a performance-critical business application or any serious stuff. Just a simple CMS with blogs/writings/photos (actual photos are NOT saved in database, just their paths are saved in MDF) and that's it. I see no problem using MDF, but I'm not an expert on the topic too as I've never worked/created a website using MDF file. I always deployed on the SQL Server, but I don't want to deal with users/roles/permissions and the last thing that I want to have a user having installation problems due to database settings.
What should I go with? Any problems that I would face with MDF? Recommendations?
IF you use SQL Server Express - which is a server - I would always opt for a "real" database approach: attach your database to the server, access it by its database name, deploy SQL scripts to update it.
That "attach DB from file path" always seemed like a half-baked and rather messy kludge to me.....
If you don't need that kind of power - investigate SQL Server Compact Edition which is a one-file only, in-process database. It has its limitations - no stored procedures, doesn't support certain data types like VARCHAR(MAX) or XML - but for easier scenarios, it's perfect and easy to use - just deploy it along your app. It's single-user, e.g. you don't share the data between several clients, it's a local store for each user/app on its own
I'm used to MySQL and PHPMyAdmin - I had to switch over to MSSQL for an ASP.net project, and I'm having tons of trouble. I'm using the express version of SQL 2008, with SQL Server Management Studio. The following are 2 questions I've been struggling with for a while:
1) How do I export the DB schema for the database? The table structure, etc.?
2) How do I export all the data in the database?
Ideally I'd like to have a .sql file that can be run wherever I need the schema or data duplicated, for example a co-worker's computer for a shared project, or online when the project is being hosted.
Thanks!
1) How do I export the DB schema for the database? The table structure, etc.?
INFORMATION_SCHEMA is your friend
SELECT * FROM INFORMATION_SCHEMA.TABLES
http://www.mssqltips.com/tutorial.asp?tutorial=179
http://weblogs.asp.net/jgalloway/archive/2006/07/07/455797.aspx
http://preetul.wordpress.com/2009/06/09/sql-server-information_schema/
Otherwise, if you want something pretty looking, download the 14 day trial of SQL Doc (part of SQL Toolbelt) here:
http://www.red-gate.com/products/SQL_Professional_Toolbelt/index.htm
"2) How do I export all the data in the database?"
In what form? .bak files are typically the most useful. http://www.sqlteam.com/article/backup-and-restore-in-sql-server-full-backups
Or were you looking to move the data into MYSQL or Excel or some other program? If you want to move data to MYSQL check here: http://www.google.com/search?q=mssql+to+mysql
I need to manipulate some tables in a JET database housed on a web-server:
check existing indexes
change table cluster/primary key
see what tables exist
rename tables
add tables
drop tables
browse data
etc
I don't have the option of installing PlaneDisaster or Access (even if i had it) on the local machine.
I've already written a generic web-based query tool. I'd rather not have to get into writing a whole web-based database maintenance GUI. Someone must have done this already, and probably many times over.
A partial answer might be Compare'Em
http://home.gci.net/~mike-noel/CompareEM-LITE/CompareEMscreens/CompareEM-About.htm The Pro version allows you to create SQL statements to update the Access database file. This will allow you to generate the differences between one version and a newer version.
His website isn't very clear but as I recall the price for the Pro version was $10.
As you say you have already done a generic web based query tool. The problem with JET is that you cannot connect with it as database server like you can do with one SQL server in order to process changes to tables and other maintenance procedures. Jet is is not a client/server RDBMS. You need to have an application in the server to do that for you as you already have done with your generic web based tool, or download the database to your machine. That's why you have done some procedures and locate them in the server as asp pages.
Anyway you can use JetSQLConsole, if you don't want to use Planedisaster or Access, but remember that you need always an application on the server to to the job for you
You can also use access "in your machine" and connect to a database located in a URL (http://myserver/mydatabase.mdb) but remember when you are doing this you are downloading all the database and when you save it you are uploading it again.
Just wondering if it is possible to convert sql-server *.mdf file into sqlite file ?
There's a C# utility to automatically do the conversion from SQL Server DB to SQLite DB on CodeProject
DBConvert for SQLite and MS SQL is a dependable bi-directional database converter which enables you to migrate data from SQLite to MS SQL server and from MS SQL to SQLite. DBConvert features: Unicode Support, Primary keys and Indexes conversion, Interactive multilingual (GUI) mode/command line mode, preverification of possible conversion errors, the ability to use MS SQL Dump if you don't have a direct access to MS SQL server, etc.
http://www.itshareware.com/prodview-code_65203--download-dbconvert-for-sqlite-and-mssql.htm
Couldnt find a free one for you!