473,503 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem?

13 New Member
hi, thanks for th reply,
I have two problems:
1) i have created a form using details view in asp.net for entering information in the dtabase. I want that when the user enters the information, the server's date shud automatically be added in that record in the databse. Now coding has to be done in asp.net (using VB.net). how should i do it, kindly tell me step by step..

2) I assigned a primary key in the database to the ID (property-Auto). which shud automatically add the serial no. every time a new record is entered. When I enter a record using database, then the ID is automatically working. Now i want that when a user enters information using the asp.net page the Auto number shud also get automatically added inthe record in the database. But it is not happening so... what should i do?


also im using MS Access and oledb connection.
Nov 14 '06 #1
2 1243
willakawill
1,646 Top Contributor
hi, thanks for th reply,
I have two problems:
1) i have created a form using details view in asp.net for entering information in the dtabase. I want that when the user enters the information, the server's date shud automatically be added in that record in the databse. Now coding has to be done in asp.net (using VB.net). how should i do it, kindly tell me step by step..

2) I assigned a primary key in the database to the ID (property-Auto). which shud automatically add the serial no. every time a new record is entered. When I enter a record using database, then the ID is automatically working. Now i want that when a user enters information using the asp.net page the Auto number shud also get automatically added inthe record in the database. But it is not happening so... what should i do?


also im using MS Access and oledb connection.
Hi. Would you please post the code that is not working
thanks
Nov 15 '06 #2
amily
13 New Member
Hi. Would you please post the code that is not working
thanks

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ReportingPage.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>MAINTENANCE REPORT</title>
</head>
<body bgcolor="#ffffcc" text="#0033cc">
<form id="form1" runat="server">
<div>
&nbsp;</div>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="ID"
DataSourceID="AccessDataSource1" Height="105px" Width="197px" DefaultMode="Insert" BorderColor="White" Caption="MAINTENANCE REPORT">
<Fields>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" />
<asp:BoundField DataField="Problem Description" HeaderText="Problem Description" SortExpression="Problem Description" />
<asp:BoundField DataField="Equipment Description" HeaderText="Equipment Description" SortExpression="Equipment Description" />
<asp:BoundField DataField="Serial or Equipment Number" HeaderText="Serial or Equipment Number" SortExpression="Serial or Equipment Number" />
<asp:BoundField DataField="Date Reported" HeaderText="Date Reported" SortExpression="Date Reported" />
<asp:BoundField DataField="Person Reporting" HeaderText="Person Reporting" SortExpression="Person Reporting" />
<asp:BoundField DataField="Comments" HeaderText="Comments" SortExpression="Comments" />
<asp:BoundField DataField="Facility" HeaderText="Facility" SortExpression="Facility" />
<asp:CommandField ShowInsertButton="True" />
</Fields>
<EditRowStyle BorderColor="White" />
</asp:DetailsView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="C:\Documents and Settings\Harpreet Narula\My Documents\invivo.mdb" InsertCommand="INSERT INTO [MaintenanceReport] ([ID], [Problem Description], [Equipment Description], [Serial or Equipment Number], [Date Reported], [Comments], [Facility], [Person Reporting]) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"
SelectCommand="SELECT [ID], [Problem Description] , [Equipment Description], [Serial or Equipment Number], [Date Reported], [Comments], [Facility], [Person Reporting] FROM [MaintenanceReport]" >
<UpdateParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="Problem_Description" Type="String" />
<asp:Parameter Name="Equipment_Description" Type="String" />
<asp:Parameter Name="Serial_or_Equipment_Number" Type="String" />
<asp:Parameter Name="Date_Reported" Type="DateTime" />
<asp:Parameter Name="Comments" Type="String" />
<asp:Parameter Name="Facility" Type="String" />
<asp:Parameter Name="Person_Reporting" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="Problem_Description" Type="String" />
<asp:Parameter Name="Equipment_Description" Type="String" />
<asp:Parameter Name="Serial_or_Equipment_Number" Type="String" />
<asp:Parameter Name="Date_Reported" Type="DateTime" />
<asp:Parameter Name="Comments" Type="String" />
<asp:Parameter Name="Facility" Type="String" />
<asp:Parameter Name="Person_Reporting" Type="String" />
</InsertParameters>
</asp:AccessDataSource>

</form>
</body>
</html>
Nov 15 '06 #3

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

Similar topics

11
3733
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
117
7102
by: Peter Olcott | last post by:
www.halting-problem.com
18
6138
by: Ian Stanley | last post by:
Hi, Continuing my strcat segmentation fault posting- I have a problem which occurs when appending two sting literals using strcat. I have tried to fix it by writing my own function that does the...
28
5170
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
6
3785
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
4870
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
2
4530
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
0
2929
by: =?Utf-8?B?am8uZWw=?= | last post by:
Hello All, I am developing an Input Methop (IM) for PocketPC / Windows Mobile (PPC/WM). On some devices the IM will not start. The IM appears in the IM-List but when it is selected from the...
1
5100
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
9
3621
by: AceKnocks | last post by:
I am working on a framework design problem in which I have to design a C++ based framework capable of solving three puzzles for now but actually it should work with a general puzzle of any kind and I...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.