Sorry but this is too generic.
Some code and a better description of the problem you are having would be helpful.
I am using the front end as VS .net2005, the language is C#
the back end is SQL server2005.
I have created the Stored procedures in sql and I want to access those SPs through DAL component.
For that I have added the dataset in C# website project, in that I have added the table from DB and connecting the DB by configuring the methods in the TableAdapter.
I am able to retrieve the data from the table but unable to insert,update or delete the data from the table using the option "Use existing stored procedure" while configure the methods in the TableAdapter.
Then I am adding one class file. class1.cs in that I wrote the code that is given below...
using System;
using System.Data;
using System.Configuration;
using System.Collections.Specialized;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public class student
{
public student()
{
StudentTableAdapters.studentTableAdapter stu = new StudentTableAdapters.studentTableAdapter();
Student.studentDataTable s1;
s1 = stu.InsertQuery();
}
}
but when I right click on the insert method in the table adapter->preview data
I got an error as "Object reference not set to an instance of an object" for that purpose only I am adding the above code to instantiate the object.
but still I am getting the error like this "Cannot implicitly convert type 'object' to 'Student.studentDataTable'. An explicit conversion exists (are you missing a cast?)"
plz help as soon as possible. Its very urgent....
Thanks in advance
Regards,
kani.Z