Mary
Tue Jan 20 17:18:58 CST 2004
There isn't all that much difference between the way you do things
using Jet and SQL Server if you use SQL statements. Access syntax
varies only for things like crosstab queries, not so much for basic
SELECT, INSERT, UPDATE and DELETE statements. If you want to operate
on the rows in the dataset one at a time, you have to walk through
them, apply your logic, then execute an update or whatever to the SQL
Server table. One way to do this is to write a stored procedure and
pass values derived from the dataset in as parameters and execute the
stored procedure once for every row. You don't say where the data in
the dataset came from or if it's bound to the same SQLS database,
which also makes a difference.
Before you proceed much further, you should probably do a little
research on ADO.NET (David Sceppa's ADO.NET is a good reference) and
also get a good book on using SQL Server that focuses on the
programming aspects (there's a gazillion of them out there -- search
amazon.com or your local bookstore). Also don't forget SQL BooksOnline
or the Microsoft SQLS home page at www.microsoft.com/sql.
-- Mary
MCW Technologies
http://www.mcwtech.com
On Tue, 20 Jan 2004 11:31:12 -0800, "pmcguire"
<anonymous@discussions.microsoft.com> wrote:
>I have a Dataset containing a DataTable (say, 'dt1') that has all the fields that are contained in a SQL Server database's table. In addition, it contains a field (let's call it 'HasItems') of type boolean. I want to populate 'dt1' with all the records in the SQL Server table, and populate the 'HasItems' field with True if matching records exist in another SQL Server table (actually a view), and False if no matching records exist. I could do this easily in Access, but I'm new to SQL Server, and need to know the best way to go about it. (The way I'm doing it now has me thinking, "First the earth cooled, then the dinosaurs came...").
>
>Specific help would be appreciated, but also a reference I could use to ramp up my SQL Server skills would be nice too.
>
>Thanks.