CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP.NET - InMotion Framework

 Change Database of my connection

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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!
View profile  Send private message
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
View profile  Send private message
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?
View profile  Send private message
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
View profile  Send private message
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

View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.