edoz
Posts: 6
|
Posted: 04/06/2008, 7:29 AM |
|
How I change database of my connection1?
I need to change InitalCatalog of my connection, so my application can start on different DB
|
|
|
NickT
Posts: 18
|
Posted: 04/07/2008, 3:20 AM |
|
I'm don't understand what are you want.
Can you please describe your problem more detail.
_________________
Nick T.
InMotion Systems |
|
|
edoz
Posts: 6
|
Posted: 04/08/2008, 11:54 AM |
|
Sorry
So I've some databases and I want to change the database property of my connection class at runtime!
with the button 1 you navigate using database 1
with the button 2 you navigate using database 2
with the button 3 you navigate using database 3....
ecc
Thanks!
|
|
|
NickT
Posts: 18
|
Posted: 04/09/2008, 2:37 AM |
|
You can create 3 database connections and use one of it as the case may be.
_________________
Nick T.
InMotion Systems |
|
|
edoz
Posts: 6
|
Posted: 04/09/2008, 6:41 AM |
|
No I want to create only one connection becausa I don't know how many db I have, my custumers can create yours and Ive to change my connection at runtime on client session
ok?
|
|
|
NickT
Posts: 18
|
Posted: 04/10/2008, 1:48 AM |
|
You can use it by using ChangeDatabase method of InMotion.Data.Connection class. You can read more in InMotion Framework Documentation (download from http://code.google.com/p/inmotion-framework/ ).
_________________
Nick T.
InMotion Systems |
|
|
edoz
Posts: 6
|
Posted: 04/11/2008, 12:18 AM |
|
I've try it but ChangeDatabase method want an open connection not a class connection, so I can't invoke ChangeDatabase before a grid display data
|
|
|
NickT
Posts: 18
|
Posted: 04/11/2008, 1:47 AM |
|
Also you can change "ConnectionString" property of your MTDataSource control. ConnectionString property gets or sets the connection name or OleDB-provider connection string that will be used for connect to database.
More detail read in InMotion Framework Documentation.
_________________
Nick T.
InMotion Systems |
|
|
edoz
Posts: 6
|
Posted: 04/11/2008, 8:27 AM |
|
yes but the ConnectionString property of mtdatasource is valid for one page not for all application.
I think that I've to edit InMotion Connection Class to accept the database parameter
|
|
|