How to work with different databases?

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

How to work with different databases?

Post by Zero-G. » Thu 01 Oct 2009 13:25

Hey
In this post: http://www.devart.com/forums/viewtopic. ... highlight=
you told me, that it would be possible, to work with different databases. I tried today with the latest build, but it doesn't work at all.

How to use the *.config file? - Because only with a different connectionstring, it seems not to work.

Please help - THX

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 02 Oct 2009 15:17

Could you please provide some details concerning the problem?
I have already made some tests with different databases and everything went ok.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Fri 02 Oct 2009 15:24

I try the following code.
But it still tries to handle the orignial Schema which is voptneu

Code: Select all

                    Dim str As String = "User Id=root;Password=*****;Host=localhost;Port=3307;Database=bacik;Compress=True;Persist Security Info=True;"
                    Dim dContext As New Voptneucontext.Voptneudatacontext(str)
Also when I try:

Code: Select all

dContext.CreateDatabase(False)
I get the error, that the table x exists, even the Database is empty


THX

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 05 Oct 2009 13:14

I have just tried to take a sample Dept record from one MySQL database and add it into the another database.
Please make sure that the DataContext.Designer.vb file does not contain any schema information
(if it does, you should delete it manually, leave table names without preceding schema name).

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Mon 05 Oct 2009 14:16

Thanks, I will try to delete all references

Because the .vb file was generated with an older version of Entity Framework.

Post Reply