开发者

ASP.NET Compiled vs Uncompiled DB qualifiers

开发者 https://www.devze.com 2022-12-29 07:05 出处:网络
We have an ASP.NET application that uses SQL statements, where table names are unqualified. When compiled, it works fine, but when uncompiled, it complains and errors out, saying these tables dont\' e

We have an ASP.NET application that uses SQL statements, where table names are unqualified. When compiled, it works fine, but when uncompiled, it complains and errors out, saying these tables dont' exist.

(Qualified name looks like Select * from MyDatabase.mySchema.MyTable ;

Unqualified like Select * from MyTable)

If you try these queries on the database, by yourself, it will take only the qualified names.

What's going on? I tho开发者_如何学JAVAught Compiled vs Uncompiled apps should perform the same way codewise.


What exactly do you mean by "Compiled" here?

I don't think the problem you are having is what you think it is. Sounds more like a security context issue where the user context you are executing the queries under in one case defaults to passing queries to myschema and the other defaults to dbo.


The applications will behave the same, my guess is that you are talking about the difference between running in Cassini and running in IIS?

If that is the case, be sure that your connection string is a specific identity, and not impersonating the caller...

0

精彩评论

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