开发者

Connect to Database server-side

I've essentially made a MVC application following the tutorial at http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part1-cs

I can upload it to a server and have the main page run just fine.. but running a different page that interacts with a database brings up the error " Invalid object name 'dbo.Lyrics'. "

Now I can connect to the database that I'm trying to use (on the server) remotely using management studio just fine.. its called Lyrics and the table is Default.Lyrics ..

The connection string I'm using is "connectionString="Data Source=74.86.97.85;Initial Catalog=Lyrics;User Id=Default;Password=****;""

So my question is .. why is my application trying to use an object with the name "dbo.Lyrics" when my entire application doesn't have that text in it? How can I solve this?

I know that the dbo prefix means DataBase Owner.. and its like a public table.. but since I'm开发者_如何学Go specifying a User ID shouldn't it look for tables with my ID as the prefix?


dbo at the beginning of an object name is a schema. Schemas partition the objects in your database. dbo is simply the default schema.

So, if you have an object named Lyrics, then it's really dbo.Lyrics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜