Can not view schema within VS2005

G

Geary

I am developing an ASP.NET website using VS2005. I am trying to access
data from a remote sqlserver 2005 database, created and maintained by
our inhouse dba. We are both fairly new to both of these products.

When I drop a sqldatasource control on a page and begin the configuation
wizard, I am able to successfully connect to his instance of sqlsvr, I
am able to select the database. On the next wizard screen, I am able to
view and select the table I want (it is actually a "view"). It displays
all of the columns and I am able to select the ones I want, but when I
test the query on the next screen I get an error msg stating that there
is a problem with the query and that the table/view is an invalid object.

The dba pointed out that the views I am trying to access have a unique
schema and I should be qualify their names with "netapps.". But the
problem is I don't see any schema qualifers in VS2005. I don't see it
in the configuration wizard nor the server explorer window. Although I
am able to browse the records in the server explorer window by
right-clicking on the view and selecting "Show results".

When I view the same database using SqlServer Management Studio (SSMS),
I SEE the schema (ex: netapps.vcolor).

We suspect my problem with the datasource configuration wizard is the
missing schema. Does anyone have any ideas why it is not showing up in
the VS? Or does anyone have any other ideas what might be going on?

I am not sure what other information may be helpful, but I will be glad
to post what I can.
 
G

Geary

Solved it.

The query will always fail in the datasource configuration wizard. Just
step thru the wizard. Go to source view of the datasource and
manually edit the select command to include the schema.

For example

SELECT * FROM [vColor]

becomes

SELECT * FROM [netapps].[vColor]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top