Designing Data Entry Form With Scope_identity .....help

Jan 17, 2007

hi i'm thinking of putting 3 texboxes for the user to enter their previous work exp which look something like this:

experience
First job.textbox
Secondjob.textbox
Thirdjob.textbox

i'm kinda confuse on with the database. The 3 tables required means i will hav 3 sqldatasource ....
which i didin't quite get it right with the Secondjob table.I try using identity_scope() and @@identity to get the ID from my first table(personel)
which is autogenerate number. It works fine with Firstjob table but not secondjob table.

Generated error message:

(1 row(s) affected)

(1 row(s) affected)

Msg 547, Level 16, State 0, Line 6

The INSERT statement conflicted with the FOREIGN KEY constraint "Personnel_Secondjob". The conflict occurred in database "test", table "dbo.Personnel", column 'IDPersonnel'.

The statement has been terminated.

INSERT INTO dbo.Personnel

(Name)

VALUES ('Jon')

insert into Firstjob(Designation, Employer, YearWorking, IDPersonnel)

values('Teachier, 'Gam', '7thn', scope_identity())

insert into Secondjob(Designation, Employer, YearWorking, IDPersonnel)

values('Musician', 'KKSB', '8thn', scope_identity())

 any suggestions....

View 2 Replies


ADVERTISEMENT

Simplest Form For Data Entry

Nov 20, 2007

I am researching ideas for the best way to have users enter data into SQL.

I am familiar with VB and Access Forms and HTML coding but what I am looking for is a way to have a standalone app or website where users can enter information but I want the form to have branches that change depending on user input (such as selecting a meeting type then having specific questions open up related to it).

Any ideas on the best way to do this?

If a different forum would be better for this request please advise and I will move appropriately.

Respectfully,

Lewis

View 2 Replies View Related

Data Entry Form TO LOAD TO SQL ---- URGENT PLEASE????

Aug 25, 2003

Hi Guys,
I have a request to create a data entry form with validation. The data is in hardcopy and people have to enter data on the screen and then this data should be output to a CSV file, so that I can load that csv file to a table. One of other important requirement is that Data entry person should be able to view the data entered and she should be able to modify them aswell. I.E we should have a form where it should also display the entered data with modifyable feautre.
I know some VB, I thought about doing this in VB. Can anyone please SUGGEST ME HOW TO IMPLEMENT THIS or Any sample code?? I really appreciate for your Help and Input. Thanks

View 1 Replies View Related

Designing (or Gathering Data From): A Hierarchical Database Using SQL

Feb 18, 2008

Hi All,

I am attempting to create a Visual C++ application based on displaying financial charts and am using SQL Express to store Stock information such as the Exchanges the stocks are traded on, the indicessectors they belong to and the Closing prices for as long as I can download data for. I am not proficient in C++ nor SQL and am using this project to learn both languages as well as making myself rich beyond my wildest dreams.

I have "designed" a database with the following tables:

tblDate_ 1 column clmDate (Primary Key, smalldatetime, NOT NULL)

tblStockExchange_ 4 column clmStockExchangeID (PK, int, NOT NULL)
clmParentID (int, null)
clmStockExchange (nvarchar(50), NOT NULL)
clmMarkets_ (FK, nchar(20), NOT NULL)

tblMarkets_ 1 column clmMarkets (PK, nchar(20), NOT NULL)

tblIndices_ 1 column clmIndices (PK, nchar(50), NOT NULL)

tblSectors_ 1 column clmSectors (PK, nchar(50), NOT NULL)

tblMarkets_Sectors 3 columns clmMarkets_SectorsID(PK, int, NOT NULL)
clmMarkets_ (FK, nchar(20), NOT NULL)
clmSectors_ (FK, nchar(50), NOT NULL)

tblSecurities_ 4 columns clmEPIC (PK, nchar(10), NOT NULL)
clmSecurity_Type (nchar(5), NOT NULL)
clmSecurty_Name (nchar(50), NOT NULL)
clmSectors_ (FK, nchar(50), NOT NULL)

tblSecurities_Indices 3 columns clmSecurities_IndicesID (PK, int, NOT NULL)
clmEPIC_ (FK, nchar(10), NOT NULL)
clmIndices_ (FK, nchar(50), NOT NULL)

tblSecurities_Date_OHLCV 8 columns clmOHLCVID (PK, int, NOT NULL)
clmEPIC_ (FK, nchar(10), NOT NULL)
clmDate_ (FK, smalldatetime, NOT NULL)
clmOpen (float, NOT NULL)
clmHigh (float, NOT NULL)
clmLow (float, NOT NULL)
clmClose (float, NOT NULL)
clmVolume (float, NOT NULL)

Why so many tables? perhaps you should put some more in...


This was the only way I could work out how to store one-to-one and one-to-many relationships required for:

- Many closing prices for many stocks
- Stocks belonging to many indices
- Stocks belonging to only one sector
- Stocks belonging to only one market (MainMarket or AIM for LSE)
- Stocks belonging to only one Exchange (I am aware of dual listed stocks but one thing at a time)

Why nchar's and not nvarchar's?

Because I didn't realise the benefits of nvarchar's until recently. How can I change this a loose the extra spaces in the cells.

Why do some tables have IDs and others don't?

I decided to put ID columns in for tables that didn't have obvious Primary Keys - if someone could explain the advantages if ID columns I would be grateful.

To the SQL Professional's eye there will be some obvious things wrong with this design and your criticism is welcome. The database I have is achieving what I would like it to do; I can plot charts using the data but I have ran into problems when trying to create a TreeView control which is what I would like to use as a navigational tool in my application.

It would seem that pulling hierarchal data from a relational database, to pass to the TreeView control, is a tricky task to say the least. I have found many articles online which discuss how to do this (using an Adjacency List Model or Nested Set Model) but they define a fairly simple example at the beginning (based on fruit or electrical goods) but don't appear to talk about gathering data from an existing relational database or changing an existing relational database so that it is more suited to storing hierarchal information. I have Joe Celko's - Tree and Hierachies in SQL for Smarties but sadly this fine material is a little beyond me!

I would like the hierarchy to look like this:

StockExchange

Market

Sector

Stock
Indices

Sector

Stock

I have written three queries to get the StockExchangeMarketSectorStock information individually from each table but am struggling with ways to put all the rows together, add left and right values (Nested Set Model) then run queries against this to get individual nodes to pass to the TreeView control. Therefore is there something I need to add to the original design?

Any help would be greatly appreciated.

View 4 Replies View Related

Multiple Data Entry

Jan 15, 2006

iam new to MS SQL 7 server...i have two tables in my database say Table1 and Table2 having a comman field--- Name String(30). I want that dual data entry should be made for any single entry. That is if a name is entered in Table1, then same entry should be automatically entered in table2

View 8 Replies View Related

Automating Data Entry Into TM.PTA.00 Or Any Other

Apr 10, 2007

question... i heard a bit about Control Macro Generator but have not found much reading material on it. here at our company we have employees fill out a weekely timesheet and typically have clerks enter the information into the TM.PTA.00 (Project Timesheet with Rate/Amount Entry) and submit it that way. say we have this timesheet in a nice little excel sheet with columns that match the input boxes on the form, how can we get it to automatically input the data instead of having a person sit there and type it all in?

View 3 Replies View Related

Preventing Overlapping Data Entry

Apr 17, 2007

Hello Everyone,
 I have a web form that allows the user to select a time to reserve.  I am trying to make it so that when a user selects a date to schedule something (which i have working) a drop down list will fill with times that have not been reserved. 
The data is stored in two tables: tblCalendar and tblTime.  tblTime contains pkTimeID and times (which are all possible times to select from in half hour intervals). tblCalendar contains a few fields but timeID and date (which is in the format M/d/yyyy) are what I need to test against.  timeID is the foreign key of pkTimeID. 
Basically when the user selects the date, a function gets called that will run a SELECT statement to get the times available.  All of this works, I am able to fill the ddl with all times available no matter what the date is or what has already been reserved.  I want to check if a time has been already selected based on the date selected by the user and only allow times not selected to be listed.
 After acheiving this I would like to prevent the immediate time before and immediate time after from being displayed because each reserved time will last for one hour but the data is stored in half hour increments.
Any help/suggestions/links will be greatly appreciated.  If I need to provide anything else please let me know.
Thanks in advance,
Brian

View 3 Replies View Related

Web Based Data Entry Into SQL 7.0 Database

Jun 1, 2000

Hi,

Do you have any idea if there is / where can I find web based data entry into SQL 7.0 database. What I'm looking for is something like Oracle Forms but for SQL 7.0.

Thanks in advance,

Boaz

View 1 Replies View Related

Showing Last Entry For Unique Data

Nov 23, 2007

hey folks,

i am looking for code to show the last entry of a database that has a unique field. for eg.. i have columns AREA, NAME, NUMBER. i need to show the last entry for each unique area.
so if there was 5 seperate areas, the table would show the last five entries for each area. anyone help?

View 6 Replies View Related

How To Create Web Interface For Data Entry?

Jun 19, 2008

Hello all,

I'm a newbie to SQL Server. I would like to practice/learn setting up web based data access. Using SQL Server 2005 and probably a sample database like AdventureWorks, I aim to create a web based interface that will allow for data access and data entry. I'm almost finished with a book about T-SQL, and I am starting to read the MS Implementation and Maintenance book, but where do I start to learn about creating the web interface? What technologies/languages are important? ADO.NET? VB.NET C#.NET?

Thanks in advance.

View 2 Replies View Related

Data By Date - One Entry Per Month

Mar 31, 2015

I have a query that pulls data by date so that I have every day of the month but I would like to group it by month so that I only have one entry per month. Can that be done?

View 2 Replies View Related

Easy Data Entry In SQL Server

Jan 22, 2006

Hi all,

I have been using SQL Server 2K for a couple of months now and I have been entering data into my tables through Enterprise Manager. I do this by selecting the table, right-clicking on it, and selecting Return All Rows.

After months of use, this method of entering data has become tedious and cumbersome. Is there an easier way to enter data into SQL Server? I don't know how to program Visual Basic, but I know how to create dynamic websites.

Microsoft Access offers the ability to make Forms, so that data entry is easier. Can SQL Server offer anything similar? Maybe SQL Server 2005 offers a GUI for data entry?

Cheers for your help!

View 11 Replies View Related

Is It Possible To Manage Data Entry And Updates T

Jul 22, 2007

Hi Guys,

I'm using Visual Basic 2005 Express and SQL Server 2005 Express. I have textboxes on a VB form linked to 2 database tables.

I am wondering if it is possible to use just ONE BindingNavigator to manage data entry and updates to THE database tables. I initially thought I could manage the tables but have I encountered some problems:

i)When I entered a new record, and clicked on the SAVE BUTTON the new record the textboxes for the 1st table saves the record to the database, but the textboxes for 2nd table still retained data in them and are not saving theirs to the database.


ii) The same textboxes for the 2nd table are NOT allowing for updates too! Or, could it simply be that it is not possible to use this method for data entry and updates?


Thanks you.

View 1 Replies View Related

How Duplicate Data Can Make An Entry????

Oct 5, 2007

Hi,
I want to know the different sources, mediums and ways using which the duplicate recoprds or adta can make an entry in our database tables. I found 4 ways for this from many articles on net that are as follows:


Duplicate data might arrive at your database via an interface to another system
Data is loaded into table from other sources because during data loads, the integrity constraints are disabled
Merging data from disparate systems
Inheriting a poorly designed databaseBut is there any other ways also present????? Please tell me???

Thanks,

View 1 Replies View Related

Data Entry In A Datetime Field

Jan 22, 2007

Hi,

I am using SQL Server Management Studio Express for creating my database. I also use the GUI tools for data entry instead of using T-SQL. Whenever I try to enter a value in a field that has a smalldatetime data type, it gives me an error message -
"Invalid Value for cell (row 1, column 2).
 
The changed value in this cell was not recognised as valid.
.Net Framework Datatype: Datetime
Error Message: Index was outside the bounds of the array.
Type a value appropriate for this data type or press ESC to cancel the change."

Now I have tried entering all different combinations in which one can enter a date or a time or both, including in the format I have specified in the windows regional settings, but I always get the same error message.

How do I input data into the field?

 

View 9 Replies View Related

Data Entry In A Datetime Field.

Jun 1, 2007

My other thread containg this same topic seems to have some error. It doesn't show up in the main 'SQL Server Database Engine' group at all. So I had to start a new thread instead.

Here's the link to the original - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1136124&SiteID=1

Here are the contents of the same -





Post#1

Orginally posted by me -

Hi,

I am using SQL Server Management Studio Express for creating my database. I also use the GUI tools for data entry instead of using T-SQL. Whenever I try to enter a value in a field that has a smalldatetime data type, it gives me an error message -
"Invalid Value for cell (row 1, column 2).

The changed value in this cell was not recognised as valid.
.Net Framework Datatype: Datetime
Error Message: Index was outside the bounds of the array.
Type a value appropriate for this data type or press ESC to cancel the change."

Now I have tried entering all different combinations in which one can enter a date or a time or both, including in the format I have specified in the windows regional settings, but I always get the same error message.

How do I input data into the field?





Post#2

Originally posted by Jens K. Suessmeyer -

Hi,

you are using a format SQL Serve ri snot expecting. Which User language did you configured for the accessing user and which date are you trying to insert ?
HTH, Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---





Post#3

Originally posted by me -

Hi,

I use only English as the default language for all programs, OS included. The date in question is not just one particular date, it is any date or time value, and I've been facing this issue ever since I started using SQL Server Express a year ago. Only I haven't used it much since, and need to seriously develop something now, that I bothered to ask the question here.

Some examples of the values I tried entering yesterday, and none of them worked. (I got the same error message for each value) -

1-1-2007

01-01-2007

01/01/2007

01,01,2007

01:01:2007

Jan 01, 2007 (this is the format I have specified for short date in the Win regional settings - MMM dd, yyyy)

I even tried entering time alongside with all those above figures in the format -

11:35 PM

11:35 AM

23:35

The only time value(s) I didn't try was/were - hh:mms tt - which is the time format specified in my Win regional settings, neither standalone, nor with the date values.

I also tried entering a time value standalone, without the date. Still no go.

(Also, as I have gleaned from previous posts, if all goes well and SQL Server accepts your data, then if you enter just a date value in a datetime field, then the field automatically gets populated with the value of the system time at that moment, and if you enter just a standalone time value, then the date part will be filled by the system date value on the date of the entry. Am I correct so far?)

Now I'm in a real fix because of the inability to enter date/time values.

Could you please help me out?





Post#6

Originally posted by me -

I don't understand. I can enter the datetime values in all the above mentioned combinations if I use an Insert or Update statement using T-SQL, but I can't seem to enter data in the datetime/smalldatetime fields at all if I try to use the GUI of Management Studio Express to enter data. (right click the table, select show table, and the grid view pops up). Ditto for using GUI tools of Visual Studio Express. Is this a bug in the Visual Studio (Express) software?

Also, my other concerns are, once I develop a front-end for data entry using VB, will I face the same issues with data entry in the datetime fields using the GUI of the front end? I can't test that right now, because I'm still learning VB, and cannot create the front end just yet.





Post#7

Originally posted by me this afternoon, but it never showed up on the page -

Alright, I have done a complete reinstall of Win XP, and have also reinstalled SQL Server Express. Prior to this, I had SQLExpress SP1, but now I have directly installed SP2.

Now I continue to face the same issue. SQL Server will not accept any value for any datetime field, unless it is entered as an SQL insert statement. It won't accept the value entered in the exact same format as the insert statement from the GUI mode of Management Studio Express, nor will it take any values from any GUI developed using VBExpress and the fill dataset method. It throws an error everytime. I don't know any other way of databinding and updating/inserting using VB at this time.

I am at my wits' end because of this. I ask again, is this a bug in SQL Server Express? If so how do I report it to MS and get my issue resolved? If not, even then how can I solve this problem?





Could someone please help me out? I am stuck and cannot use the product at all, without the datetime field.

View 29 Replies View Related

Ordering Data By Entry Rather Than Column

Apr 16, 2008

In my search results I need to order my data by a particular entry rather than a particular column and then add all the other entries onto the end of the result set. Specifically I'm trying to order my records by a particular location in a city so those entries in that location appear first in the result set and then on the end I want to include all the other locations in that city.

I'm assuming I'll need to do these as separate queries and then use a UNION statement but I'm wondering if there is a better or easier way. Is there, for example, another type of ORDER BY clause that lets me order by a particular entry rather than a column?

Thanks

View 12 Replies View Related

How To Calculate Data Entry By Monthly

Mar 3, 2008

Hi, I'm using SQL 2005, and I want get the total of data for February as an example. My table table is like this

submitdt
-----------
01/02/2008
25/02/2008
29/02/2008
01/03/2008
02/03/2008


so total submit date for february is 3. Your idea is highly appreciated.thanks you so much

View 7 Replies View Related

Data Entry With Reporting Services

Dec 12, 2007

Has anyone here been able to incorporate a way of data entry using reporting services. What I would like to see is a single page that not only provides the report but also allows for the entry of data. It would be much cleaner to have both together.

View 7 Replies View Related

Many Data Entry Tables - Which Ones Hold Records?

Oct 23, 2005

We have an asp.net app with about 200 data entry forms. Customers mayenter data into any number of forms. Each form's data is persisted ina corresponding sql table. When data entry is complete, it needs to beprocessed. Here's where the questions start.How can we easily determine in which tables a customer has data and howbest to select that data?We're not opposed to putting all the data in a single table. Thistable would wind up having ~15 million records and constantly have CRUDoperations performed against it by up to 5000 users simultaneously.With sufficient hardware, is this too much to ask of the db?

View 10 Replies View Related

How To : Truncation : Can I Write A Log Entry Whenever Data Is Truncated?

Jul 3, 2006

I'm reading data from a flat file source. If some data gets truncated, i have the option of 'ignoring', 'redirecting' or 'fail component'.

What i'd like to do is, to allow the data to be truncated, but i'd also like to write a log entry so that i can know that a particular rows data has been truncated.

I've tried 'redirecting' the row to a script component (as transformation), but i don't know how to determine if the error is truncation or not, not only that, i can't redirect the row back to the 'original' flow, which is a derived field column.

Any ideas on how to do ?

Cheers.

View 9 Replies View Related

Duplicate Data Entry When Using The ASP.NET Web Site Administration Tool For Logins

Nov 5, 2007

Hello All,

I am using the Web Site Administration Tool with the ASP.NET login controls to create/manage user logins & roles for my site.

I have exported the ASPNETDB.MDF into my SQL Database ready to use with my app. The problem that I'm having is that whenever I add a user, using either the Web Site Administration Tool or the Classes available in the code-behind. The entry is doubled up in the database.

This is not a problem when logging on....however, when it comes to deleting a user it will only take one of the entries out and leave the duplicate in there. So if the administrator has deleted a user from the app and then tried to create another one with the same UserName (Which whomever is well within his/her rights to be able to do), they cannot because the entry which has "stay behind" in the database conflicts with the entry.

Any help on this matter would be greatly apprieciated. If any more info on this matter is required please ask (It was quite hard to try and explain this :-)

View 1 Replies View Related

System.Data.SqlClient.SqlException: Could Not Locate Entry In Sysdatabases For Database

Oct 18, 2007

I am getting the exception - System.Data.SqlClient.SqlException: Could not locate entry in sysdatabases for database. Does anyone has any idea, how to resolve this?
Thanks

View 2 Replies View Related

One Form To Update Different SQL Tables Based Upon Form Selection

Apr 16, 2008

Hello,
My company Intranet has a form that agents can use to post their comments about the company to upper management, but our customer service department would like to modify the form so that the agent has to pick from a comment type.
The dropdown options on the form will be as follows:
ComplimentsComplaintsGeneral CommentsSuggestions
Each dropdown option has a designated table in a SQL DB.Using postback on the same page, I need to change which fields of the form are visible based upon which dropdown selection the user chooses, and I need the fields to then be inserted into the table that corresponds with the dropdown selection item.
For example: If the Compliments dropdown selection is picked, I need a text box to show for the user's location, the name of the customer, account number, and the message box. Once the submit button is clicked, the characters in these boxes need to be inserted into the Compliments table using its data adapter.
However, if the user selects Suggestions, the name of the customer and the account number should not be visible, since these fields do not exist and when the submit button is pressed, the Suggestions table should be updated.
If you need more information, I will provide whatever is needed.
As always, thanks for everyone's assistance.
Chris

View 3 Replies View Related

Designing A Database Within A Database... Design Question Storing Data...

Jul 23, 2005

I have a system that basically stores a database within a database (I'msure lots have you have done this before in some form or another).At the end of the day, I'm storing the actual data generically in acolumn of type nvarchar(4000), but I want to add support for unlimitedtext. I want to do this in a smart fashion. Right now I am leaningtowards putting 2 nullable Value fields:ValueLong ntext nullableValueShort nvarchar(4000) nullableand dynamically storing the info in one or the other depending on thesize. ASP.NET does this exact very thing in it's Session State model;look at the ASPStateTempSessions table. This table has both aSessionItemShort of type varbinary (7000) and a SessionItemLong of typeImage.My question is, is it better to user varbinary (7000) and Image? I'mthinking maybe I should go down this path, simply because ASP.NET does,but I don't really know why. Does anyone know what would be the benifitof using varbinary and Image datatypes? If it's just to allow saving ofbinary data, then I don't really need that right now (and I don't thinkASP.NET does either). Are there any other reasons?thanks,dave

View 7 Replies View Related

How To Add Data To SQL Via Web Form?

Feb 19, 2008

HiI am using Visual Web Developer 2005 Express and SQL Server Express 2005.From Northwind I can display data to Gridview.Could someone point me in the right direction on two points.How do I start a new database (.mdf) - I cannot find this option.I can change Northwind around - but I want to start my own database.
Once I have that sorted - how can I "insert" data into database using a dropdown box?A "dropdown" box such as you would find online.
Thanks in advance.Stephen

View 2 Replies View Related

INSERTING DATA WITH WEB FORM

Apr 25, 2008

I need help to resolve the following problem. 
I have a form that is supposed to insert data into my data base. But I get an error message when I click submit.
Below is the Code and after that is the error message that I get. Thank you in advance.
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
End SubProtected Sub insertSubmitBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs)
SqlDataSource1.Insert()End Sub
</script><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
 function pageLoad() {
}
 
</script>
<style type="text/css">
.style1
{width: 34%;
}
.style2
{width: 144px;
}</style>
</head><body>
<br />
 
<form id="form1" runat="server">
 
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
 
<br /><asp:SqlDataSource ID="SqlDataSource1" runat="server"
InsertCommand="INSERT INTO property(provinceName, cityName, ownerName, ownerPhone, numOfRooms, rent, ownerEmail, listPeriod, addInfo)
VALUES(@provinceName, @cityName, @ownerName, @ownerPhone, @numOfRooms, @rent, @ownerEmail, @listPeriod, @addInfo)">
<InsertParameters><asp:ControlParameter ControlID="provinceddl2" Name="provinceName"
PropertyName="SelectedValue" /><asp:ControlParameter ControlID="cityddl2" Name="cityName"
PropertyName="SelectedValue" /><asp:ControlParameter ControlID="nameTxtBox" Name="ownerName"
PropertyName="Text" /><asp:ControlParameter ControlID="phoneTxtBox" Name="ownerPhone"
PropertyName="Text" /><asp:ControlParameter ControlID="roomsTxtBox" Name="numOfRooms"
PropertyName="Text" />
<asp:ControlParameter ControlID="rentTxtBox" Name="rent" PropertyName="Text" /><asp:ControlParameter ControlID="EmailTxtBox" Name="ownerEmail"
PropertyName="Text" /><asp:ControlParameter ControlID="listPeriodddl" Name="listPeriod"
PropertyName="SelectedValue" /><asp:ControlParameter ControlID="addInfoTxtBox" Name="addInfo"
PropertyName="Text" />
</InsertParameters>
</asp:SqlDataSource>
<br />
<br />
<br />
<br />
 
<table cellspacing="1" class="style1">
<tr>
<td class="style2">
Contact Name:</td>
<td>
<asp:TextBox ID="nameTxtBox" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Contact phone:</td>
<td>
<asp:TextBox ID="phoneTxtBox" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Province:</td>
<td>
<asp:DropDownList ID="provinceddl2" runat="server" Width="205px">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style2">
City:</td>
<td>
<asp:DropDownList ID="cityddl2" runat="server" Width="205px">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style2">
Email:</td>
<td>
<asp:TextBox ID="EmailTxtBox" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Number of Rooms:</td>
<td>
<asp:TextBox ID="roomsTxtBox" runat="server" Width="80px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Monthly Rent:</td>
<td>
<asp:TextBox ID="rentTxtBox" runat="server" Width="80px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Period to list:</td>
<td><asp:DropDownList ID="listPeriodddl" runat="server"
DataSourceID="listPeriodSqlDataSource" DataTextField="listDays"
DataValueField="listDays" Width="85px">
</asp:DropDownList><asp:SqlDataSource ID="listPeriodSqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:PlaceConnectionString1 %>"
SelectCommand="SELECT [listDays] FROM [listPeriod]"></asp:SqlDataSource>
</td>
</tr>
<tr>
<td class="style2">
Additional Infomation:</td>
<td><asp:TextBox ID="addInfoTxtBox" runat="server" Rows="5" TextMode="MultiLine"
Width="200px"></asp:TextBox>
</td>
</tr>
</table>
<br />
;&nbsp;&nbsp;&nbsp;<asp:Button ID="insertSubmitBtn" runat="server" Text="Submit" Width="140px"
onclick="insertSubmitBtn_Click" />
<br/>
 <cc1:CascadingDropDown
ID="Provincecdd2"
runat="server"
TargetControlID="Provinceddl2"
Category="Province"
PromptText="Select a province"
ServicePath="Location.asmx"
ServiceMethod="GetProvince" />
<br /><cc1:CascadingDropDown
ID="Citycdd2"
runat="server"
TargetControlID="Cityddl2"
ParentControlID="Provinceddl2"
Category="City"
PromptText="Select a city"
ServicePath="Location.asmx"
ServiceMethod="GetCity" />
 
</div></form>
</body>
</html>
 
Server Error .


Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.Source Error:



An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:



[ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +2132728
System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +108
System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +55
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +11
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +353
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1194

 
Hotkwesi

View 1 Replies View Related

Insert Data Form Xls

Dec 22, 2006

Hello,

I'm trying to make a query to insert data form xls file to my database and it's working

Here's my code

INSERT INTO MY_TABLE
SELECT SAP_NBR, PERIOD, ANSWER, OSAT, SCORE
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="C:
ipTMP_Aubrygsi_osat.xls";
User ID=Admin;Password=;Extended properties=Excel 8.0')...Sheet1$
WHERE SAP_NBR is not null
AND PERIOD is not null
AND ANSWER is not null
AND OSAT is not null
AND SCORE is not null


And I would like to verify if there no sap_nrb and period already the same in the database
so I add :
AND SAP_NBR not in MY_TABLE.SAP_NBR
AND PERIOD not in MY_TABLE.PERIOD

but it doesn't work

what's the correct syntax to make it work ???

Thanks a lot & merry Xmas... :)

View 8 Replies View Related

Adding Data From A Form To A Database

Nov 15, 2007

Very basic question here but I need to add a form to a page so it adds content, its as simple as that.  I've done this kind of using a <asp.Formview> tag and it works, but becuase I think I've used a form view I have to click add to insert data first.  Should I be using the <asp:formview> tag or is it a problem with the templates?
 <asp:FormView ID="FormView1" runat="server" DataKeyNames="ContentID" DataSourceID="ObjectDataSource1">                                      <InsertItemTemplate>                        Resource :<asp:DropDownList ID="ResourceIDTextBox" runat="server" Text='<%# Bind("ResourceID") %>' DataSourceID="ObjectDataSource2"                            DataTextField="Resource" DataValueField="ResourceID">                        </asp:DropDownList><br />                        Headline:                        <asp:TextBox ID="HeadlineTextBox" runat="server" Text='<%# Bind("Headline") %>' Width="451px"></asp:TextBox><br />                        Date:                        <asp:TextBox ID="DateTextBox" runat="server" Text='<%# Bind("Date") %>'>                        </asp:TextBox><br />                        Body:                                        <FTB:FreeTextBox id="FreeTextBox1" runat="Server" Text='<%# Bind("Body") %>' Width="542px" />                        <br />                        ImageURL:                        <asp:TextBox ID="ImageURLTextBox" runat="server" Text='<%# Bind("ImageURL") %>'>                        </asp:TextBox><br />                        OpeningPara:                        <asp:TextBox ID="OpeningParaTextBox" runat="server" Text='<%# Bind("OpeningPara") %>'>                        </asp:TextBox><br />                        Ret:                        <asp:TextBox ID="RetTextBox" runat="server" Text='<%# Bind("Ret") %>'>                        </asp:TextBox><br />                        Man:                        <asp:TextBox ID="ManTextBox" runat="server" Text='<%# Bind("Man") %>'>                        </asp:TextBox><br />                        Pro:                        <asp:TextBox ID="ProTextBox" runat="server" Text='<%# Bind("Pro") %>'>                        </asp:TextBox><br />                        Com:                        <asp:TextBox ID="ComTextBox" runat="server" Text='<%# Bind("Com") %>'>                        </asp:TextBox><br />                        IndustryID:                        <asp:TextBox ID="IndustryIDTextBox" runat="server" Text='<%# Bind("IndustryID") %>'>                        </asp:TextBox><br />                        ContentTitle:                        <asp:TextBox ID="ContentTitleTextBox" runat="server" Text='<%# Bind("ContentTitle") %>'>                        </asp:TextBox><br />                        Status:                        <asp:TextBox ID="StatusTextBox" runat="server" Text='<%# Bind("Status") %>'>                        </asp:TextBox><br />                        Pub:                        <asp:TextBox ID="PubTextBox" runat="server" Text='<%# Bind("Pub") %>'>                        </asp:TextBox><br />                        Fin:                        <asp:TextBox ID="FinTextBox" runat="server" Text='<%# Bind("Fin") %>'>                        </asp:TextBox><br />                        <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"                            Text="Insert">                        </asp:LinkButton>                        <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"                            Text="Cancel">                        </asp:LinkButton>                    </InsertItemTemplate>                    <ItemTemplate>                                             <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"                            Text="Click here to Add New Content">                        </asp:LinkButton>                    </ItemTemplate>                </asp:FormView>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"                    InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="ContentADDMethod"                    TypeName="DataSet2TableAdapters.ContentADDAdapter" UpdateMethod="Update">                    <DeleteParameters>                        <asp:Parameter Name="Original_ContentID" Type="Int32" />                    </DeleteParameters>                    <UpdateParameters>                        <asp:Parameter Name="ResourceID" Type="Int32" />                        <asp:Parameter Name="Headline" Type="String" />                        <asp:Parameter Name="Date" Type="String" />                        <asp:Parameter Name="Body" Type="String" />                        <asp:Parameter Name="ImageURL" Type="String" />                        <asp:Parameter Name="OpeningPara" Type="String" />                        <asp:Parameter Name="Ret" Type="String" />                        <asp:Parameter Name="Man" Type="String" />                        <asp:Parameter Name="Pro" Type="String" />                        <asp:Parameter Name="Com" Type="String" />                        <asp:Parameter Name="IndustryID" Type="Int32" />                        <asp:Parameter Name="ContentTitle" Type="String" />                        <asp:Parameter Name="Status" Type="String" />                        <asp:Parameter Name="Pub" Type="String" />                        <asp:Parameter Name="Fin" Type="String" />                        <asp:Parameter Name="Original_ContentID" Type="Int32" />                        <asp:Parameter Name="ContentID" Type="Int32" />                    </UpdateParameters>                    <InsertParameters>                        <asp:Parameter Name="ResourceID" Type="Int32" />                        <asp:Parameter Name="Headline" Type="String" />                        <asp:Parameter Name="Date" Type="String" />                        <asp:Parameter Name="Body" Type="String" />                        <asp:Parameter Name="ImageURL" Type="String" />                        <asp:Parameter Name="OpeningPara" Type="String" />                        <asp:Parameter Name="Ret" Type="String" />                        <asp:Parameter Name="Man" Type="String" />                        <asp:Parameter Name="Pro" Type="String" />                        <asp:Parameter Name="Com" Type="String" />                        <asp:Parameter Name="IndustryID" Type="Int32" />                        <asp:Parameter Name="ContentTitle" Type="String" />                        <asp:Parameter Name="Status" Type="String" />                        <asp:Parameter Name="Pub" Type="String" />                        <asp:Parameter Name="Fin" Type="String" />                    </InsertParameters>                </asp:ObjectDataSource>                                                      <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" InsertMethod="Insert"                      OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="DataSet2TableAdapters.ResourcesTableAdapter">                      <InsertParameters>                          <asp:Parameter Name="Resource" Type="String" />                      </InsertParameters>                  </asp:ObjectDataSource>
 

View 1 Replies View Related

Insert Post Data From A Form Into Db

Dec 26, 2007

Hi,I'm new at asp .net and have a problem. I have a page where the logged in user can add another user to his list of friends. To do this, I have a page where all the users are listed by using a datalist, and I have a form with an invisible field which passes the value of <%#DataBinder.Eval(Container.DataItem, "UserName")%> in post when the user clicks on "add as a friend" so that in the next page I can get that value and add it as well as the username of the logged in user to the table friendships. This is not working, can anyone help please? The code of the page with the datalist is:<script language="VB" runat="server"> Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs)        ' Session("username") = User.Identity.Name        Dim CurrentUser As String        CurrentUser = Membership.GetUser.ProviderUserKey.ToString()                  End Sub            Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)        Dim DS As DataSet        Dim MyConnection As SqlConnection        Dim MyCommand As SqlDataAdapter        Dim CurrentUser As String        CurrentUser = Membership.GetUser.ProviderUserKey.ToString()                               MyConnection = New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True")        MyCommand = New SqlDataAdapter("select u.*,f.buddyId as userNameIfFriend from aspnet_Users u left outer join aspnet_friendship f ON u.UserId=f.buddyId AND f.userId=@Param1 where IsAnonymous='False' and u.UserId<>@Param1", MyConnection)        'Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|;Integrated Security=True;User Instance=True               MyCommand.SelectCommand.Parameters.AddWithValue("@Param1", CurrentUser)        DS = New DataSet()        MyCommand.Fill(DS, "aspnet_Users")        MyDataList.DataSource = DS.Tables("aspnet_Users").DefaultView        MyDataList.DataBind()                  End Sub</script><body>    <br />  <ASP:DataList id="MyDataList" RepeatColumns="1" runat="server">      <ItemTemplate>        <table cellpadding="10" style="font: 10pt verdana" cellspacing="0">          <tr>            <td width="1" bgcolor="BD8672"/>            <td valign="top">                          </td>            <td valign="top">            <div id="hey"><div id="dados"><b>Name: </b><%#DataBinder.Eval(Container.DataItem, "UserName")%><br><b>city: </b><%#DataBinder.Eval(Container.DataItem, "City")%><br></div>               <div id="photo"><b>Photo: </b><%#DataBinder.Eval(Container.DataItem, "UserName")%><br>status: <form id="teste" name="teste" method="post" action="add_buddy.aspx">                                   <input name="UserId" type="hidden" id="UserId" value="<%#DataBinder.Eval(Container.DataItem, "UserName")%>" />                </form>                                <%#IIf(Container.DataItem("userNameIfFriend") Is DBNull.Value, "<a href='add_buddy.aspx'>Add as buddy</a> ", "Already buddy")%>         </div>                            <p></div>              <a href='<%# DataBinder.Eval(Container.DataItem, "UserName", "purchase.aspx?titleid={0}") %>' >                                                         </a>            &nbsp;&nbsp;</td>          </tr>        </table>      </ItemTemplate>  </ASP:DataList></body></asp:Content>The code of the page where the user is redirected to add a friend and where I want to make the insert is:  <script runat="server">    Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs)        Dim CurrentUser As String        CurrentUser = Membership.GetUser.ProviderUserKey.ToString()                  End Sub        Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)        Dim CurrentUser As String        CurrentUser = Membership.GetUser.ProviderUserKey.ToString()                ' Declaring variables        Dim UserId As String        ' A Function to check if some field entered by user is empty                ' Receiving values from Form        UserId = (Request.Form("UserId"))               Dim MyConnection As SqlConnection        Dim MyCommand As SqlDataAdapter                   MyConnection = New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True")                MyCommand = New SqlDataAdapter("insert @Param2, @Param1 into aspnet_friendship.userId, aspnet_friendship.buddyId", MyConnection)        MyCommand.SelectCommand.Parameters.AddWithValue("@Param1", CurrentUser)        MyCommand.SelectCommand.Parameters.AddWithValue("@Param2", UserId)             ' Creating Connection Object and opening the database        Dim DS As DataSet        DS = New DataSet()        MyCommand.Fill(DS, "aspnet_friendship")                ' Done. Close the connection                End Sub    </script> I am not sure if sending the information in a form in post to another page and executing the query there is the best option or if I can do it all within
the if statement. I appreciate any help, since I am having difficulties in solving this.Thank you.   

View 3 Replies View Related

Updates Form Remote Data

Oct 13, 2005

I have been successful with DTS packages and various SQL statements. However, I have a new challenge. I have a table in an SQL Server database. One of the columns is employee number and a column for department number(which is not populated) In a remote AS400 file I have the employees number and department number. I want to create a package to connect to remote table and update SQL Server table with department number where the two tables match on the employee number.

View 3 Replies View Related

Using Query Or Vba ,transfer Data From One Form To

Feb 27, 2007

using a query or vba ,transfer data from one form to another,
table1 customers-form1 customer address,
table2 orders-form2 order address,
how do i transfer data from customer address to order address
yours M [/center]

View 1 Replies View Related

I'm Not Able To Insert Data From A Form Into A Database Table

Feb 18, 2007

Hello.  As the subject heading says, I'm not able to insert data typed into the contact form on my page into a database table.  I'm using an SqlDataSource object.  Here's the code for this page:
 
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><%@ Page Language="VB" Debug="True" Explicit="True" ContentType="text/html" ResponseEncoding="iso-8859-1" %><%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.Odbc" %><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head><body><div align="center">  <asp:label ID="label1" runat="server" Font-Name="Arial" Font-Size="24" ForeColor="#00FF00" /></div><div align="center">  <asp:label ID="label2" runat="server" Font-Name="Verdana" Font-Size="18" ForeColor="#0000FF" /></div><form runat="server" id="new_form">  <table width="50%" border="1" align="center" id="form_table">    <tr>       <td nowrap="nowrap">         <asp:label Font-Bold="true" Font-Size="10" runat="server" Font-Name="CarlysHand" Text="First Name" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("FirstName") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="15" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="first" TabIndex="1" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="first" Type="String" ErrorMessage="Please enter your first name." Display="Dynamic" /> </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Middle Initial" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("MI") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="1" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="mi" TabIndex="2" /></td>    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Last Name" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("LastName") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="18" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="last" TabIndex="3" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="last" Type="String" ErrorMessage="Please enter your last name." Display="Dynamic" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Number & Street" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("NoAndStreet") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="40" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="no_and_street" TabIndex="4" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="no_and_street" Type="String" ErrorMessage="Please enter your number and street." Display="Dynamic" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Unit #" BackColor="#FFE1E1" ForeColor="#FF0000" />      </td>      <td><asp:textbox text='<%#Bind("Unit") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="6" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="unit" TabIndex="5" /></td>    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="City" BackColor="#FFE1E1" ForeColor="#FF0000" />      </td>      <td><asp:textbox text='<%#Bind("City") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="20" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="city" TabIndex="6" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="city" Type="String" ErrorMessage="Please enter your city." Display="Dynamic" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="State" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("State") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="2" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="state" TabIndex="7" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="state" ErrorMessage="Please enter your state." Type="String" Display="Dynamic" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Zip Code" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("ZipCode") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="5" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="zip" TabIndex="8" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="zip" ErrorMessage="Please enter your zip code." Type="Integer" Display="Dynamic" />   <asp:regularexpressionvalidator Display="Dynamic" runat="server" ValidationExpression="[0123456789]{5}" ControlToValidate="zip" ErrorMessage="Please enter a valid US Zip Code" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Phone #" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("PhoneNumber") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="10" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="phone" TabIndex="9" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="phone" ErrorMessage="Please enter your phone number." Type="Double" Display="Dynamic" />      <asp:rangevalidator runat="server" ControlToValidate="phone" MinimumValue="2002000000" MaximumValue="9999999999" Type="Double" ErrorMessage="Please enter a valid US Phone Number." Display="Dynamic" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Email" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("Email") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="40" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="email" TabIndex="10" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="email" ErrorMessage="Please enter your email address." Type="String" Display="Dynamic" />      <asp:regularexpressionvalidator runat="server" ControlToValidate="email" ErrorMessage="Please enter a valid email address." ValidationExpression=".*@.{2,}..{2,}" Display="Dynamic" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Username" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox text='<%#Bind("Username") %>' BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="12" TextMode="SingleLine" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="username" TabIndex="11" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="username" ErrorMessage="Please enter your username." Type="String" Display="Dynamic" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Password" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td> <asp:textbox text='<%#Bind("Password") %>' Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="12" TextMode="Password" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="password" TabIndex="12" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="password" ErrorMessage="Please enter your password." Type="String" Display="Dynamic" />    </tr>    <tr>       <td nowrap="nowrap">         <asp:label Font-Size="10" Font-Bold="true" runat="server" Font-Name="CarlysHand" Text="Confirm Password" BackColor="#FFE1E1" ForeColor="#FF0000" /></td>      <td><asp:textbox Font-Size="10" BorderColor="#BF0000" BorderStyle="Groove" BorderWidth="2" BackColor="#FFCCFF" ForeColor="#FF0000" Columns="12" TextMode="Password" Font-Bold="true" Font-Name="CarlysHand" runat="server" ID="confirm" TabIndex="13" /></td>      <asp:requiredfieldvalidator runat="server" ControlToValidate="confirm" ErrorMessage="Please confirm your password." Type="String" Display="Dynamic" />      <asp:comparevalidator runat="server" ControlToValidate="confirm" ControlToCompare="password" Type="String" ErrorMessage="Please input matching passwords." Display="Dynamic" />    </tr>    <tr>       <td colspan="2" align="center" nowrap="nowrap"><asp:linkbutton BorderColor="#0000FF" BorderWidth="3" BorderStyle="Dotted" ToolTip="Click me!" Text="Submit" Font-Name="CarlysHand" Font-Size="15" Font-Bold="true" BackColor="#CCCCCC" ForeColor="#FF0000" runat="server" ID="submit" TabIndex="14" /></td>    </tr>  </table>   <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="driver={MySQL ODBC 3.51 Driver};server=mysql01.discountasp.net; data source=bkfwebdesi1_mysqlConn;database=MYSQLDB_316823;uid=bkfwebdesi1; password=bkf2065" ProviderName="System.Data.Odbc"   InsertCommand="INSERT INTO ContactInfo VALUES (?, ?, ?, ?, ?, ?, ?, ?,       ?, ?, ?, ?, ?)">     <InsertParameters>  <asp:Parameter Name="ContactID" Type="Int32" />  <asp:Parameter Name="FirstName" Type="String" />  <asp:Parameter Name="MI" Type="String" />  <asp:Parameter Name="LastName" Type="String" />  <asp:Parameter Name="NoAndStreet" Type="String" />  <asp:Parameter Name="Unit" Type="String" />  <asp:Parameter Name="City" Type="String" />  <asp:Parameter Name="State" Type="String" />  <asp:Parameter Name="ZipCode" Type="Int32" />  <asp:Parameter Name="PhoneNumber" Type="String" />  <asp:Parameter Name="Email" Type="String" />  <asp:Parameter Name="Username" Type="String" />  <asp:Parameter Name="Password" Type="String" /> </InsertParameters>  </asp:SqlDataSource></form></body></html>
 
Thanks in advance for your help in this matter!
 
Brian

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved