I can't use Autoincrement because I want to be able to enter different templates where I can define the base index n.
Well technically his design is wrong, the ID field should be stupid bejond identifying the record. What you are calling an ID field is actually your CODe field and may be edited by the users. What happens if they want to change the code for Granny Smith Apples to 7 series?
You could always write a scrip/code for the loop passing in the start series and the product. You cannot avoid a loop somewhere.
Never underestimate the power of human stupidity
///In the getid.aspx page
<pre><%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="authenticate1.aspx.cs"Inherits="hokm.Admin.authenticate1"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><scriptrunat="server">protectedvoid salam(object sender, EventArgs e)
Session["field1"] = sh1.Text;
Please enter your id number
so I put the Id in session["field1"];
and in the editinformation.aspx
I have a database named information and every row in this database has a unique id!
I want to update the row with the special id(that I have stored that id,for example it is in "ID" variable), but I dont know how should I use the select and update command to do this!
plz help me!
ok,for example I have an information table with columns(id,fname,lnam) and I want to access the (fname,lnam) by Id,because I want to use them as string;
I know that I should the select command Like this:
select(id,fname,lname)WHERE id="" but I dont know how to access the fnam,lname with this Id as string!
ID INTIDENTITY(1,1) PRIMARYKEY,
INSERTINTO Person VALUES ('John', 'Doe'), ('Code', 'Project')
SET FIRSTNAME = 'Peter'WHERE ID = 1SELECT *
Execute in SQL-Management Studio. You'll see two tables; one before, and one after the update. You will need a good book that introduces you to some basic SQL-constructions.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
thank you so much
but I dont know how should I use parameter!for example I have the CreateUserWizard1.UserName variable but I dont know how should use it as parameter! can you say me how should I do it?
protectedvoid CreateUserWizard1_CreatedUser(object sender, EventArgs e)
conststring connectionstr = @"...";
conststring sqlstring = "insert into Authenticate (username, password) VALUES (@username, @password)";
using (var con = new System.Data.SqlClient.SqlConnection(connectionstr))
using (var objcommand = new System.Data.SqlClient.SqlCommand(sqlstring, con))
Once you've fixed that problem, you then need to reconsider how you're storing the passwords. Currently, you're storing them as plain text, which is a terrible idea. If anyone managed to gain access to your database, they would be able to see every password used on your site.
I am receiving an Overflow error from an INSERT statement. I understand this is because a value that is assigned to a variable is larger than the data type, correct? The database was built in Access.
I pinned the values on screen while debugging and took a screen shot, which is linked herewhich is linked here.
I have double checked the data types and they all seem to match.What am I missing?
Thank you in advance.