Link to home
Start Free TrialLog in
Avatar of jazmarc
jazmarc

asked on

Table fields missing when dragged into SQL Qry Builder

I'm creating a web project on a Win2000 pro workstation connecting to an IIS 5 server connected to SQL server via System DSN. I create my data connection,(OLE DB for SQL) all tests fine. I create my data command, and open SQL Query Builder. When I drag my tables into the upper pane there are no fields in the tables,(except the ALL Catagories field) and there are no relationships between the tables(foreign key etc.) which there certainly are if I view the database diagram on the SQL Server itself. If I open the same project on the same pc with a desktop version of SQL running, the Table's fields and relationships will showup when dragged into the upper pane, allowing me to choose the fields and make my query. I sense there's some issue with connecting to the SQL server, or IIS server, but I can't figure it out. I have dbo rights over the database, I've relaxed security on the IIS server, but I'm a newbie dealing with VI and IIs so I could've missed something. And maybe this is more of a IIS/2000 configuration question?
Thanks for your help.
Avatar of dgorin
dgorin

I just tried to duplicate your problem but couldn't.  I made a new Interdev connection using a system DSN that connects to a NT4/SQL7 server as sa.  Computer with Interdev is W2K Pro.  I saw all the columns in the table when I dragged a table into the sql query builder pane.

You may want to revisit the DSN configuration and verify what user it's set up for, etc.

Avatar of jazmarc

ASKER

Yeah I've been reading more about this trying to solve it as well, and in Teach Yourself Visual Interdev 6 in 24hrs. they describe the exact problem I'm having and attribute it to the ODBC connection or permissions "the Query Designer will not display data columns for an input source if you do not have sufficent access rights to the input source or if the ODBC driver cannot return information about an input source you are using (for example, if no such table currently exists). In such cases, only a title bar is displayed for the input source window and the * (All Columns) check box."
So now my question is...Which ODBC do I use? Do I set one up on my local workstation and connect to the SQL server directly? Do I point to a File DSN I've setup on the Web Server? And are there any permissions I need to setup within the ODBC to ensure I have adequate rights to the database? I know the user setup in ODBC IS the database owner. It would seem I'm missing some piece to the ODBC/OLEDB puzzle. Thanks for your response.
ASKER CERTIFIED SOLUTION
Avatar of dgorin
dgorin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jazmarc

ASKER

Thanks
Armed with that I went in today to play with it again.
I was determined to get to the bottom of this. This time I loaded Interdev directly on the Web server I'm working on, just to take my workstation out of the troubleshooting loop. Any way I tried to connect to the SQL server I'd only pull up a title bar with no columns! Being really frustrated now I went to look at the database on the SQL server. It's small, thankfully, only 4 tables, our IT dept. wants to have a database with a Web front end to keep our trouble tickets in. So I recreated the thing. I didn't set it up originally, but here's the kicker, this is the name of the database 'IT Database'(without quotes).
THE DAMN NAME HAS A SPACE IN IT!!! I could kill the guy who set this up. I recreated the DB called 'it_database'in no time, setup my Data Environment in VI and saw my titlebar with columns immediately!!! What a relief. Thanks for your help explaining which server connects where.
Glad you got it working!