SQL View and Datagrid problem

G

gfarrell

Hi,

I am using a datagrid, dataset and dataadapter to retrieve data from a
database view. I have done this successfully with tables and also
stored procedures. I could not use the table directly because I got an
error when I tried to create an SQLDataAdapter with visual studio
because the table had more than 100 columns in it. So I thought I would

create a view and use it.


System
1. SQL Server 2000 sp3 on Windows 2003
2. Visual Studio MDE2002 ver 7.0.9466
3. .Net Framework 1.0 ver 1.0.3705


Steps so far.
1. Created view called Web_WorkOrder. Created datagrid in Visual Studio
and bound in to a view. No rows are retrived.

2. Run in SQL Analyzer: select * from dbo.Web_WorkOrder where wonum =
'525794'

3. Capture using SQL profiler and Run in SQL Analyzer: exec
sp_executesql N'SELECT wonum, status, statusdate, worktype,
description, eqnum, location, faildate, changeby, changedate,
wopriority, ldkey, reportedby, reportdate, actstart, actfinish FROM
Web_WorkOrder WHERE (wonum = @WonumI)', N'@WonumI varchar(10)', @WonumI

= '525794'


Steps 2 & 3 both work.


Regards,
Garry
 

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

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,271
Latest member
BuyAtenaLabsCBD

Latest Threads

Top