You had provided the Programatically mapping in scheduler help.But i want to create scdulerdatdataset, apointmentsBindingsource,apointmenttableadpet etc using code not but design form
Is it possible.My application need to create a database then save the scheduler data to the newly created database and save .Each time i want the user to determine database name& location.If some part is done in design it is not possible.Any way?
Is it possible.My application need to create a database then save the scheduler data to the newly created database and save .Each time i want the user to determine database name& location.If some part is done in design it is not possible.Any way?
4 Answers, 1 is accepted
0
Jeff
Top achievements
Rank 1
answered on 27 Dec 2012, 07:27 PM
What database format will you use? Different databases have different methods to pragmatically create them. For example, SQL can attach a database from file, or queries can be used to create the database. You can create your own XML or other text based database. Access databases are also easy to create at run time. Your dataset can be created and mapped to the RadScheduler at design time but you will create the database and load the dataset at run time.
If I've misunderstood your question, I apologize.
If I've misunderstood your question, I apologize.
0
Anoop
Top achievements
Rank 1
answered on 28 Dec 2012, 03:36 AM
Yes i want to load database at runtime as per user input.I use sql database.I don't know to how to load database at runtime.
0
Accepted
Jeff
Top achievements
Rank 1
answered on 28 Dec 2012, 05:04 AM
Do you need to create the database or just the connection to the database? If you need to create the database it might be best to include a starter database and attach it once the user has selected the SQL server and provided credentials. If the user is familiar with SQL they may want to attach the database and supply their own permissions. Some of my larger customers prefer tighter control and manage the database.
You can also use the MS Data Connection UI. http://archive.msdn.microsoft.com/Connection/Release/ProjectReleases.aspx?ReleaseId=3863
The data connection dialog document on that page explains how to use the UI. You just save the connection string it returns. It can also attach a database from a file.
To load the database at run time, I first establish the connection in my development environment. This gives you an application setting for the connection string. Add code to check the string and if the connection string is invalid use the UI to allow them to create the proper connection string. Save this string to the application setting like this My.Settings.YourConnectionString = TheStringFromUI. Now you have a saved string that you can use right before Tableadapter.Fill. Use the this new connection string like this: YourTableAdapter.Connection.ConnectionString = My.Settings.YourConnectionString
There's a lot of examples of this once you know what to look for.
You can also use the MS Data Connection UI. http://archive.msdn.microsoft.com/Connection/Release/ProjectReleases.aspx?ReleaseId=3863
The data connection dialog document on that page explains how to use the UI. You just save the connection string it returns. It can also attach a database from a file.
To load the database at run time, I first establish the connection in my development environment. This gives you an application setting for the connection string. Add code to check the string and if the connection string is invalid use the UI to allow them to create the proper connection string. Save this string to the application setting like this My.Settings.YourConnectionString = TheStringFromUI. Now you have a saved string that you can use right before Tableadapter.Fill. Use the this new connection string like this: YourTableAdapter.Connection.ConnectionString = My.Settings.YourConnectionString
There's a lot of examples of this once you know what to look for.
0
Anoop
Top achievements
Rank 1
answered on 28 Dec 2012, 11:41 AM
Thanks Jeff that saved me