Thank you for your response.
I don't know how to create a strong typed dataset, I will show you how I get
my data.
I'm using the folling DataHandler to get my data:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace meetmate.DataLayer
{
/// <summary>
/// Summary description for DataHandler.
/// </summary>
public class DataHandler
{
private SqlConnection conn;
private string connectionString;
public DataHandler()
{
connectionString = ConfigurationSettings.AppSettings["connectionString"];
conn = new SqlConnection(connectionString);
}
public DataSet GetDataSet(SqlCommand cmd)
{
cmd.Connection = conn;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
public void ExecuteCommand(SqlCommand cmd)
{
cmd.Connection = conn;
try
{
conn.Open();
cmd.ExecuteNonQuery();
}
finally
{
conn.Close();
}
}
}
}
In another module I call the Get like this:
public DataSet GetMeetingByID(int meetingID)
{
string qry = "select
titel,datum,tijd_van,tijd_tot,adres,plaats,tekst,verslag " +
"from Meetings " +
"where ID = @ID";
SqlCommand cmd = new SqlCommand(qry);
cmd.Parameters.Add(new SqlParameter("@ID",meetingID));
DataHandler dh = new DataHandler();
DataSet ds = dh.GetDataSet(cmd);
return ds;
}
Then, in my BusinessLayer, I call the GetMeetingByID.
Do you know or have a reference how I could use typed DataSet in this?
Thank you,
Eddy
> If you are using a typed dataset you can set a property of the column
> called NullValue and have it come back with a default value (which is a
[quoted text clipped - 40 lines]
> >
> > Eddy de Boer
James Doughty - 26 Oct 2005 14:13 GMT
Take a look at http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnhcvb03/html/vb03f9.asp
If you have any questions or don't understand something about let me
know.
=?Utf-8?B?ZWRkeSBkZSBib2Vy?= <eddydeboer@discussions.microsoft.com>
wrote in news:ACBD4AC0-0F66-4317-919E-1D184380724C@microsoft.com:
> Thank you for your response.
> I don't know how to create a strong typed dataset, I will show you how
[quoted text clipped - 116 lines]
>> >
>> > Eddy de Boer
eddy de boer - 27 Oct 2005 07:24 GMT
Thank you James
> Take a look at http://msdn.microsoft.com/library/default.asp?
> url=/library/en-us/dnhcvb03/html/vb03f9.asp
[quoted text clipped - 125 lines]
> >> >
> >> > Eddy de Boer