I would like access a sql express db in multiple projects, a dynamic data project to administrate the data and a console application which fetches the data from the db, is there an option to do this? or should I use a SQL CE for this kind of scenario?
A database is meant to be accessed from different clients. You can specify the same connection string in both projects, Dynamic Data and Console. SQL Server Express will handle traffic from both over the network easily.
You can use different data access strategies as well, in both projects. LINQ To SQL, DIY ADO, SubSonic, etc.
Related
We have two divisions in our company, one uses E1 on Oracle 11g the other uses SAP on Oracle 11g.
We also have a SQL Server system we use to data warehouse information once a night from both system to run our report server against.
The question I have is for pooled tables in SAP, such as A016, how would I get that information out of SAP?
Currently we have SSIS's setup with a linked server to the two Oracle servers which pull the data we need I just don't have the knowledge of SAP to find the Pooled tables.
if I can't pull the pooled tables because they don't physically exist is there a tool I can use in SAP to find out what tables the pooled table is getting it's information from? This way I can rebuild that table in SQL using a open query and some fun Joins.
Thanks
You have to access those tables using the application server. They can't be accessed directly from the database.
You'll probably want to write an ABAP program to extract the data you need go from there.
In our legacy SW we make our own wrapper classes to perform DB command and query. Now we want to switch to .NET 4 and want to use LINQ to SQL. But I am not quite sure whether it is mandatory to add a .mdf file to make it work.
Because we have our database service running already, and we would like to keep using the database on it(because our customers would want to keep using their databases), obviously we don't want to distribute a brand-new database file with our SW. But every article I found about LINQ to SQL says that I need to add a .mdf file to the project to make it work. So how should we do that? Can we use LINQ without assigning any database in the development?
Thanks!
LINQ to SQL doesn't require a local .MDF file in a project to work. You can generate LINQ to SQL classes against an existing remote database. Just connect to the server in the Server Explorer and drag tables to the LINQ to SQL designer.
Many people use the .MDF file in examples simply because it's a small, self-contained database. It's a convenience to the demo, not a requirement.
Additionally, it's possible to create a .MDF file with a schema that matches a remote database and work against that file during development but simply switch connection strings to go from a local file to a remote database.
I have 2 databases, Oracle and SQlite. And I want to create exact copies of some of the Oracle tables in SQLite in one of my applications. Most of these tables contains more than 10,000 rows so copying each table by going through each row programmatically is not efficient. Also the table structure may change in the future so I want to achieve this using a generic way without hard-coding the SQL statements. Is there a any way to do this?
p.s. - This application is being developed using Qt framework. All the queries and databases are represented by QtSql module objects.
Can't help with Qt framework, but for large amounts of data is is usually better to use bulk-copy operations.
Export data from Oracle
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/impexp.htm#BCEGAFAB
Import data into SQLite
http://www.sqlite.org/cvstrac/wiki?p=ImportingFiles
IHTH
What you probably really want to use is the Oracle Database Mobile Server, which can automatically synchronize a SQLite and an Oracle Database.
The recent release of the Oracle Database Mobile Server (formally called Oracle Database Lite Mobile Server) supports synchronization between an Oracle Database and a SQLite or a Berkeley DB database running on the client. It supports both synchronous and asynchronous data exchange, as well as secure communications between client and server. You can configure the Mobile Server to synchronize based on several options without the need to modify the application that is accessing the database.
You can also find an excellent discussion forum for questions from developers and implementers using the Mobile Server.
How I can write database independent, data layer using Linq to Sql? For example I have one dbml file, which I can use with almost any database at runtime ( by specifying web.config)
Entity framwork is a better option, but it is not implemented in Mono so I can't use it.
Edit: I mean different databases like Sql Server, Mysql or SqlLite. I prefer to use DbLinq for other databases.
Edit 2 :
I have created Linq to Sql mapping class by following this blog post.
http://blogs.msdn.com/b/spike/archive/2010/01/08/how-to-use-linq-to-sql-without-using-the-designer-generated-classes.aspx
Now how I can use this with other databases.
You need a 3rd party linq provider like ALinq http://www.alinq.org/ that suports Mono.
As it is structured from Microsoft, Linq to SQL is VERY database dependent, ie it only works with MS SQL. I believe that ALinq does work on mono. Here's a better list of 3rd party providers:
http://blog.linqexchange.com/index.php/links-to-linq-providers/
I'm a bit new to database projects, but I find that with a bigger team it is a good way to synchronize development.
I had a single Database Project that contained all the tables used by a web app.
The powers that be want to display data from another database in the web app.
I create another Database Project that represents the tables I need in the other database.
I create views in the original database that represent tables in the second database (for linq to sql joins mainly)
Questions
Do I create a Sql Server 2008 Server Project and merge both of these databases into it? From what I can tell, a Server Project still only represents a single database.
If a Server Project isn't meant to represent multiple databases, what is it for?
I have added steps in our TFS Workflow to deploy changes from the first Database Project into our Dev environment on check-in (CI). Assuming a Server Project is meant to contain multiple database projects, can I deploy it and have it deploy changes in both databases?
Thanks!
A server project is for server scope objects needed by your solution: endpoints, server principals (logins), server level permissions, linked servers and other similar constructs that are not scoped to any particular database.
Seems to me that what you need is a solution with two projects:
your original database project
you reference database project
You need a third project in this solution, a server project, only if you must add server scoped objects.
For more details, see Using References in Database Projects.