maintain my dataset and its queries

bibang

Member
Joined
Dec 27, 2012
Messages
9
Programming Experience
Beginner
vb 2010 dataset, using sql server 2008
i have a dataset [MUST] from my pc, i have 2 tables here and already contains lots of queries, so my problem now, our instructor wants a centralize database, it means we will use the database from other pc, though ill still use the same database and the same tables, also named [MUST], through LAN, i can connect to that server and use the same database via sql, my problem now is that how will i still be able to maintain my dataset and its queries, because removing my existing dataset and connecting the same dataset to new server will also remove all the queries i made, please help, what is the right thing to do, thanks
 
Hi,

You have two options from what I can see and understand:-

1) Re-Create or Transfer all the queries you use in your project to the centralised database
2) Create the queries as Constant strings within your own project so that you can execute them as you need without having to rely on what is available in your backend data source.

Hope that helps.

Cheers,

Ian
 
now i realize what is the disadvantage of making queries directly to dataset or tableadapter or not manually writing the sql commands, sir thank you for your reply, can i ask how to transfer the queries i made on my project? i made my queries just via adding query on tableadapter or to specific dataset and using query builder, thank you
 
Hold on, hold on! It seems to me that you're trying to solve a problem that doesn't exist. Are you saying that your app now needs to connect to a different database but that that database has exactly the same schema as the old one? If so then all you have to do is change the connection string. Open the Settings page of the project properties and edit your connection string there. Job done.
 
yes exactly the new database im going to connect which is on the different server(PC) is the same with the database im using now at my own pc, i saw the settings page and im going to try it, thanks a lot
 
sir jm, i tried it already with different sql server but just here in the same pc,and its working,i dont need to change any datasets or queries, my new problem is that i cant conect to the database(the same) on the other pc, ofc were connected locally, i can see its server name but selecting in database combobox, it is empty, if i manually type the database it cant connect, it says, it says a "network related or instance-specific error, the server was not found or not accessible. verify that the instance name is correct or is configured to allow remote connections," ive already tried this step: How to enable remote connections in SQL Server 2008? - <dw:daniel_walzenbach runat="server" /> - Site Home - MSDN Blogs , but stil not working, thank you
 
you mean using my manage studio at my pc, i can conect the instance and database of the other pc? were connected loccaly, is that possible?
 
Back
Top