472,364 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,364 software developers and data experts.

Regarding DALC Creation using stored procedures

I have created the DAL component using stored procedures but I am unable to insert,update and delete the records in the Database.

But retrieve is done as a whole and unable to retrieve a particular record using the Id.
May 21 '08 #1
3 1407
1,134 Expert 1GB
I have created the DAL component using stored procedures but I am unable to insert,update and delete the records in the Database.

But retrieve is done as a whole and unable to retrieve a particular record using the Id.
Sorry but this is too generic.
Some code and a better description of the problem you are having would be helpful.
May 21 '08 #2
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

May 21 '08 #3
2,878 Expert 2GB
Have you tried posting this on the C# forum? They might be able to help your better as this is more of C# question that an sql-server question.

-- CK
May 21 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: jacobryce | last post by:
I'm new to using .net and data access logic components and I'm getting a bit confused on the best way to design the data layer. I have a table called Document that has a 1 to many relationship with...
by: Leo | last post by:
I'll make it brief: are DALC (Data Access Layer Components) and DAO (Data Access Objects) the same thing? They appear to be from what I've read on MSDN. I'm quite familiar with the DAO pattern...
by: scott | last post by:
Hi, Just wondering what sort of problems and advantages people have found using stored procedures. I have an app developed in VB6 & VB.NET and our developers are starting to re-write some of the...
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
by: David Veeneman | last post by:
What is the better way to connect a DALC component and a domain model; an interface, or an event? I'm creating an application that looks like this: --> --> --> o- Messages drill down...
by: Amber | last post by:
Stored procedures are faster and more efficient than in-line SQL statements. In this article we will look at two SQL Server stored procedures; one using an input parameter and one not, and see how...
by: Wie | last post by:
I need help. How do I create a stored procedure with SQLCommand? I have tried following string, but it doesn't work. I am using vs.net 2003 professional now. dbCommand.CommandText = _...
by: annhere | last post by:
Hi, Could any one please shed some light as to how an jar whose copy has been deleted from the SQLLIB\FUNCTIONs\JAR\<schema> still be referred to from our projects? Even after installing a fresh...
by: kanimozhiz | last post by:
Hi Can anyone tell me how to invoke the DALC(Data Access Logic Component) class using stored procedures in C# .net I have created the DALC using stored procedure but I was unable to execute it....
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.