Require code for windows form
I have created a windows form with 3 textboxes as user name,password,retype password and two buttons as register and exit.what is the code to save the user details ,in database
You could use the SqlCommand.ExecuteNonQuery method to execute an insert statement against a database connection:
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executenonquery(v=vs.110).aspx
using (SqlConnection connection = new SqlConnection(
"your connection string to the database..."))
SqlCommand command = new SqlCommand("INSERT INTO [yourtable] (UserName, Password) VALUES (@UserName, @Password)", connection);
command.Parameters.AddWithValue("@UserName", txtUserName.Text);
command.Parameters.AddWithValue("@Password", txtPassword.Text);
command.Connection.Open();
command.ExecuteNonQuery();
You can retrieve the value of a TextBox, such as your Username and Password textBoxes, by its Text property (nameOfTextBox.Name).
You will also need to specify a valid connection string to your database:
http://www.connectionstrings.com/sql-server/
And of course you must also replace [yourtable] and "UserName" and "Password" with the real names of your database table and it columns in the sample SQL statement code above.
Hope that helps.
Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.
Similar Messages
-
Could you provide example code for interactive form
Dear all.
I have got document at link below
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d
In that document it has some part of abap code.
Could you have full example code for interactive form online and offline?
Thank you very much.Hi,
Go to the following link to know more about adobe interactive form.
http://wwwimages.adobe.com/www.adobe.com/enterprise/partners/pdfs/bwp_interactive_forms_adobe.pdf
The following link contains a offline application in ABAP. You can try it.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d
For further questions, check the follow
https://www.sdn.sap.com/irj/sdn/adobe
Improving the Performance of Adobe® LiveCycleu2122 Designer Forms(scripting)
http://www.adobe.com/devnet/livecycle/articles/lc_designer_perf_guidelines.pdf
Interactive Forms Based on Adobe Software: Overview
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e635e290-0201-0010-a9be-9e8e4ce04770
Adobe Interactive Forms
http://www.saplounge.be/Files/media/pdf/Huberland-Interactive-Forms-2007.10.10.pdf
Taking interactive forms to next level
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8c103c36-0301-0010-cda8-f6b381bedb6e
Introduction to Adobe PDF Library SDK(PDFL SDK)(Simply scroll the document)
http://partners.adobe.com/public/developer/en/webseminars/PDFL_WebSeminar.pdf
Creating Interactive forms in webdynpro for java
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f27e290-0201-0010-ff82-c21557572da1
PDF-Based Print Forms/SAP Interactive Forms by Adobe
http://help.sap.com/saphelp_nw04s/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm
Date Objects in Adobe Designer
http://help.sap.com/saphelp_nw04/helpdata/en/dd/60694fddb74ad88cdb7d2a094f3dd2/frameset.htm
Checking and Testing a PDF-Based Print Form
http://help.sap.com/saphelp_nw04s/helpdata/en/c2/1fe9aa4d7b413e8515f90b73729e97/frameset.htm
Architecture
http://help.sap.com/saphelp_nw04/helpdata/en/f2/21021b911f4c0cae11459a4ce0bc62/frameset.htm
http://www.nl4b.com/Adobe/Invitation_SAPBrussels_Q407.pdf
Hope this helps!!
Regards,
Arafat -
Anti spam codes for website forms are not being accepted on my imac or iPad
anti spam codes for website forms are not being accepted on my imac or iPad
In Safari go to preferences click on privacy and on Block Cookies tick the never box
-
What is SHA1 code for Windows 8.1 Enterprise Evaluation ISO files
Since I downloaded the files from TechNet, no sha1 code information is given in my download webpage, could someone kindly provide the SHA1 code for Windows 8.1 Enterprise Evaluation ISO files named
9600.16384.WINBLUE_RTM.130821-1623_X64FRE_ENTERPRISE_EVAL_EN-US-IRM_CENA_X64FREE_EN-US_DV5.ISO
(my sha1 code is 73321fa912305e5a16096ef62380a91ee1f112da)
and
9600.16384.WINBLUE_RTM.130821-1623_X64FRE_ENTERPRISE_EVAL_ZH-CN-IRM_CENA_X64FREE_ZH-CN_DV5.ISO
(my sha1 code is 2fc5246dd9d02d185e92283324d9b81822827f19)Hi,
This version is Windows 8.1 Enterprise Evaluation, I suggest you check sha1 in TechNet subscription download center.
Welcome to Subscriber Downloads
https://technet.microsoft.com/en-US/subscriptions/securedownloads/hh442904#searchTerm=Windows%208.1%20Enterprise&ProductFamilyId=0&Languages=en&PageSize=100&PageIndex=0&FileId=0
Regards,
Yolanda
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Hi, I need help with making a form manditory to have
informtation entered before submitting. I already have the form set
up I just need the correct code to make it not send the form until
they have entered all of their contact information. Please help.
Thank you in advance.
Regards,
DannahThe code you have posted tells nothing. It's the generic
function code.
The actual validation details are in your <form> tag,
but do this - select
the <form> tag on the QuickTagSelector, and edit the
behavior you have
applied to it by double clicking on the validate form
behavior name in the
Behaviors panel. Cycle through your form fields and make
those missing ones
also be required.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Dannah" <[email protected]> wrote in
message
news:[email protected]...
>I got most of my forms to work, thank you! But I am still
having a problem
>with
> validating this code. It is only making name, state,
zip, country
> required.
> Well we need the contact information like phone and
email to be required
> this
> is way more important.
>
> Here is the following code that I am working with for
this form:
>
> function MM_validateForm() { //v4.0
> var
i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
> for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
> val=MM_findObj(args
> if (val) { nm=val.name; if ((val=val.value)!="") {
> if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
> if (p<1 || p==(val.length-1)) errors+='- '+nm+' must
contain an
> e-mail
> address.\n';
> } else if (test!='R') { num = parseFloat(val);
> if (isNaN(val)) errors+='- '+nm+' must contain a
number.\n';
> if (test.indexOf('inRange') != -1) {
p=test.indexOf(':');
> min=test.substring(8,p); max=test.substring(p+1);
> if (num<min || max<num) errors+='- '+nm+' must
contain a number
> between '+min+' and '+max+'.\n';
> } } } else if (test.charAt(0) == 'R') errors += '-
'+nm+' is
> required.\n';
> }
> } if (errors) alert('The following error(s)
occurred:\n'+errors);
> document.MM_returnValue = (errors == '');
>
> Any information would be greatly appreciated...
> -
Source code for window explorer in JTree
I am a JAVA learner and want to display the drives as the root node in the tree structure.
i am not able to add window explorer in the tree structure as root. . i want sample program for doing as follows. I want a tree structure something like:
- My Computer
|_
+ Drive 1 (C: )
+ Drive 2 (E: )
+ Drive 3 (E: )
can any one suggest me the code for adding different drives as unexpanded root node as above
thanx in advance.Hi neha,
If you post this in Swing forum, you may get a solution.
http://forum.java.sun.com/forum.jspa?forumID=57 -
How to create a setup for window form application including the related sql database?
i have created a simple window form application project that have only 2 form..
1st one for login in which it'll check the userid n password from database.if both are correct then it will go to 2nd form.
now i want this project to run in another computer.
i created a setup file but its showing some error regarding the database instances connection..
so if anyone can tell me in details how to create the setup file then it'll b a great help..
thanx in advance..Hi,
Consider the above scenario,I suggest you to use the SQL Server Compact+ ClickOnce Deployment, A Compact SQL database is a file that can be bundled with your application installation. Below is a link guiding you through the creation process of a SQL Compact
database.
http://technet.microsoft.com/en-us/library/ms173009.aspx
The following link discusses setting up the necessary dependencies and prerequisites for SQL Server Compact. (Note, you will need to scroll to the section entitled Private File–Based Deployment.)
http://msdn.microsoft.com/en-us/library/aa983326(v=VS.100).aspx
A ClickOnce Deployment can help you publish your application attach compact SQL database into client machine.
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Question:
I have been using two web forms to allow access to a secure zone. Of them, one is for the trial user access and another is for the paid user access.
The problem is: Can I use discount codes for the secure zone access? I can't see the way of integrating eCommerce discount codes with web forms.
Answer:
Discount codes don't actually work with secure zone access since you have to accept payment through web forms. However, I hired an outside developer to write some code for me, which I don't mind sharing:
Put this in the Head of your document:
<script type="text/javascript">
function refreshAmountToCharge() {
var frm = document.forms[0];
var defaultAmountToCharge = 100;
var couponCode = "ABC123"; // A tribute to Michael Jackson...
var percentOff = 50;
var couponCode2 = "DISCOUNT2";
var percentOff2 = 67;
var couponCode3 = "DISCOUNT3";
var percentOff3 = 99;
var couponCode4 = "DISCOUNT4";
var percentOff4 = 75;
/* Fixed amount coupon c*/
var fixedCouponCode1 = "FIXED1";
var fixedAmount1 = 20.00;
var fixedCouponCode2 = "FIXED2";
var fixedAmount2 = 6.00;
var fixedCouponCode3 = "FIXED3";
var fixedAmount3 = 7.00;
var amountToCharge = defaultAmountToCharge.toFixed(2);
if (frm.couponCode.value.toUpperCase() == couponCode)
amountToCharge = (defaultAmountToCharge - (defaultAmountToCharge * percentOff / 100)).toFixed(2);
else if (frm.couponCode.value.toUpperCase() == couponCode2)
amountToCharge = (defaultAmountToCharge - (defaultAmountToCharge * percentOff2 / 100)).toFixed(2);
else if (frm.couponCode.value.toUpperCase() == couponCode3)
amountToCharge = (defaultAmountToCharge - (defaultAmountToCharge * percentOff3 / 100)).toFixed(2);
else if (frm.couponCode.value.toUpperCase() == couponCode4)
amountToCharge = (defaultAmountToCharge - (defaultAmountToCharge * percentOff4 / 100)).toFixed(2);
else if (frm.couponCode.value.toUpperCase() == fixedCouponCode1)
amountToCharge = (defaultAmountToCharge - fixedAmount1).toFixed(2);
else if (frm.couponCode.value.toUpperCase() == fixedCouponCode2)
amountToCharge = (defaultAmountToCharge - fixedAmount2).toFixed(2);
else if (frm.couponCode.value.toUpperCase() == fixedCouponCode3)
amountToCharge = (defaultAmountToCharge - fixedAmount3).toFixed(2);
frm.Amount.value = amountToCharge;
// ----------- End Coupon Code Javascript ---------------------
</script>
Then, you'll need a Coupon Code field in your form:
<div class="item">
<label for="couponCode">Coupon Code</label><br />
<input type="text" name="couponCode" id="couponCode" class="cat_textbox" />
<a href="javascript:refreshAmountToCharge()">Update</a>
</div>
That's it. Let me know if you have any questions. You can set multiple codes, either percentage based or fixed amount. Experiment with it to make sure it works as expected.This is great Mario! Thanks so much for sharing. It works very well.
One thing I want to add is a validation for the coupon update action. If the coupon is no longer valid or entered incorrectly, a message would be great, because the person might no even notice the fact that the amount did not change even though they think they entered a valid discount code.
Sean -
HTML code for adobe forms/formsCentral
Anyone has the HTML code for any of these forms? I would like to add one of the forms to my website.
ThxHi,
FormsCentral has Embed Form feature which enables you add a FormsCentral form to your web site. Please check out the first part of the document on how to embed a form into an html page: http://forums.adobe.com/docs/DOC-1991.
Thanks,
Wenlan -
HOW TO FIND T-CODES FOR SCRIPT FORMS?
HI EVERY BODY,
"ME9F" IS THE T-CODE FOR PRINTING "MEDRUCK" FORM ALONG WITH THE DATA FROM PRINT PROGRAM.
LIKE WISE WHAT ARE ALL THE OTHER T-CODES FOR SAP PROVIDED FORMS. PLEASE LET ME KNOW HOW TO FIND THESE T-CODES?
THANKS IN ADVANCE,
REGARDS,
MOUNIKA.Hi Mounika,
Please check this transaction as well.
ME9A - Message Output: RFQs
ME9E - Message Output: Sch. Agmt. Schedules
ME9F - Message Output: Purchase Orders
ME9K - Message Output: Contracts
ME9L - Message Output: Sched. Agreements
PJNA - Message Output
WLN14 - Message Output Agency Documents
WLN15 - Message Output for List Documents
Hope this will help.
Regards,
Ferry Lianto -
Invalid Activation Key Code for Windows 7
Re: CSOxxxxxxxxxx (IBM)
: Lenovo pt/#-57Y2911
I purchased a T500 with VISTA and upgraded to Windows 7 (pt/#-572911), purchased from Lenovo. Installed it as directed and now Microsoft has monitored the software as it is on my computer and they are saying it is not a valid Key Code. One Key Code came with the new disc that was mailed to me and it was not working as I placed it in the BOX. So Lenovo e-mailed me another Key Code and I have been operating Windows 7 for about a Month and now I'm being told once again that the Key Code is in error.
I spoke with IBM by phone on Friday (12-12-09) and was told by a fellow named P that I was being asked for the Key Code to Microsoft Office 2007 and tonight (12-13-09), Saturday, I'm finding out that the Key Code wanted is for Windows 7 and not Microsoft Office!
I hope there is someone credible with Lenovo that will follow up on this matter...the phone number given me by e-mail is (866-968-4465). The person (P) there was of no help! I still have a copy of the e-mail, to prove my case.
Please help!
I do not like this kind of situation! And I hope not to have to give Lenovo a bad name; I spent a lot of money!
Note from Moderator: Employee identification removed as per the forum rules.LAY wrote:I hope there is someone credible with Lenovo that will follow up on this matter
Welcome to the forum!
While there are a few Lenovo employees roaming around in here helping out on a volunteer basis, this is not an official support channel with dedicated Lenovo support personnel assigned to it. Instead, this is designed to be a user-to-user support and discussion forum. You may or may not get an answer directly from one of the Lenovo employees as there are way more of us than them and all of them, even Mark, have full-time jobs doing other things.
English Community Deutsche Community Comunidad en Español Русскоязычное Сообщество
Jane
2015 X1 Carbon, ThinkPad Slate, T410s, X301, X200 Tablet, T60p, HP TouchPad, iPad Air 2, iPhone 5S, IdeaTab A2107A, Yoga Tablet, Yoga 3 Pro
I am not a Lenovo Employee.
I AM one of those crazy ThinkPad zealots!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! -
How would I go about removing the required code from a form field?
I have this contact form that I downloaded and its fine. I just need to know how to remove the required field code from the contact no field.
Thanks in advance
Here is a link to the form and all of its assets
http://www.formget.com/jquery-contact-form/#comment-93253HTML code, change this:
<label>Contact No: <span>*</span></label>
To this:
<label>Contact No:</label>
jQuery code, change this:
if (name == '' || email == '' || contact == '') {
alert("Please Fill Required Fields");
} else {
to this:
if (name == '' || email == '') {
alert("Please Fill Required Fields");
} else {
Nancy O. -
I had to conduct a Factory Recovery on my notebook. Everything loaded correctly. When I opened Windows Office Home Edition it asked for a product code. I don't know where that is located, it came already installed on the computer. I looked through the original paper work that came with the laptop and can't find any information.
Please help, I have much work to do.If it came pre-installed as the full version, then you should have received the product code with your paperwork when you purchased the notebook. Unfortunately there is no way to recovery the product key from the previous version of Windows that you had installed.
-------------How do I give Kudos? | How do I mark a post as Solved? -------------------------------------------------------- -
Invalid Product Code for Windows 7
I recently purchased a laptop from BB that has Windows 7 already installed on it. However, it keeps asking for the product key and the one on the label on my computer is coming up "invalid". any help/suggestions would be greatly appreciated!
I don't think I follow.... The sticker contains the windows 7 product key. Some customers confuse this with microsoft office and when it asks for a key they think it is the one on the sticker because it says microsoft. The computer in general should not be asking for the product key as they come pre activated.
Crystal
Superuser
Forum Guidelines | Terms & Conditions | Community Guidelines | What is a Superuser?
*Remember to mark your questions solved and click the star to give kudos to show your thanks!*
While I used to be a Best Buy Employee, I no longer have any affiliation with Best Buy.
My opinions do not in any way shape or form represent Best Buy's Official decisions. -
Programming Operating System dependent code for Windows
Is there a Java API that has classes and methods that are specific to the Windows OS?
What I need is a way to toggle between two programs.
For example let's say I have IE open at java.sun.com and Word open also.
I need to create a program that will essentially Alt+Tab between the two programs automatically every 15 seconds.
..... Is there a way to send key strokes to the OS... I guess that would also work.
Thanks!..... Is there a way to send key strokes to the OS...
I guess that would also work.The Robot class provides a few methods that let you send keyStrokes to the OS. You can use that for a sleezy work around. But to do it the right way, you will want to write the methods in C or C++ to make the Win32 api calls to get the window handles and switch windows. Then use JNI to call those C/C++ methods from your Java code where you can do all the timeing stuff.
Maybe you are looking for
-
In Mountain Lion, GChrome suddenly started crashing/quitting at launch
Is there a glitch in Mountain Lion in relation to Google Chrome? Or vice versa some wort of incompatibility? I've used Chrome faultlessly on my MacBook Pro (running Snow Leopard) since its original introduction. I replaced my MBP with a new MBP-Retin
-
Standard report for the cost of raw materail in production of finished good
Is there any standard report for calculation of raw material cost from the production order of finished goods.? plz help in this issue. Thanks.
-
Hi all, Belated Happy Holi. Can u explain me the difference between Select-options and ranges? When, where and how to use them ? I know the basic differences, but i need to know in deep . could u give me the informatin with a scenario please ? Thank
-
How to configure WEBGUI ?
Hi Everyone, We installed SAP Netweaver 7.0 ABAP with ORACLE on Windows Server 2008 R2 Enterprise OS. we are trying to access WEBGUI from web browser, but we are getting ERROR, we checked the note { 517484 Inactive services in
-
Recreate database from an existing database script
Hi Experts, I need script to recreate database from an existing database.I tried this to find in websites,im not able to get it. please help me to do this, Thanks in advance. regards sundar