Tuesday, March 27, 2012

CREATE TABLE in wrong database (Master)

I am using ASP.NET 1.1 and MS SQL 2005

the folowing ODBC stringconnection
Driver={SQL Server};Server=(local);MyBase;Uid=;Pwd=;Trusted_Co nnection=;

when trying to CREATE a TABLE (with vb.net code) I get an error because the TABLE are written inMaster !! and not inMyBase

I am using windows Authentication

what can be wrong ?

thank youWhat is your reason for creating table in VB.NET instead of managment studio with SQL or the GUI and why are you using obsolete ODBC instead of ADO.NET? When you get the answer to that you will know why you are creating the table in the Master database. Hope this helps.|||Caddre if you donyt know the answer to that problem please give up !
i must do it in that way because the database allready exists in many intranets on > 10 000 PC|||the problem is why is it creating tables in Master when the connection string =
Driver={SQL Server};Server=(local);MyBase;Uid=;Pwd=;Trusted_Connection=;

?

|||But you still don't do it that way, you have two options get the DBA to create the table for you or you should just right click and register the SQL Server with the database at the top of management studio. The number of users on the network is not relevant the only requirement is on the same network and in an intranet you are. And you don't need new SQL Server with your SQL Server running your DBA can give you the personal SQL Server free it comes with the license. Here I have read only access to Oracle if I need to create something the DBA will create it. And yes I also use SQL Server I can help you with most problems. Post again if you still need more help. Hope this helps.|||thanks a lot Caddre but it works fine now

just forgottent database= in the connectionstring when i have copy-pasted the string

and that way of course works perfectly|||I am glad you got it resolved and I am sorry about my first post.

No comments:

Post a Comment