SQL Insert Command with Textboxes

tehon3299

Well-known member
Joined
Jan 6, 2003
Messages
155
Location
Liverpool, NY
OK - This is probably a pretty straight forward question... What is the syntax of the SQL Insert Command when say you have 2 textboxes that you want to get the data from? i.e. INSERT INTO tableName (columnNames) VALUES (textbox.Text)

I know thats not right but its the right idea.

P.S. This is on an ASPX page in .NET

Thanks
 
Yes, I saw that but what would the syntax be for more than one textbox using the same INSERT string? Im just unsure about the quotes and stuff and where to use them and how to use them.

Thanks
 
With oCmd
oCmd.CommandText = "INSERT INTO dbo.Contributor(AuthorId,prefix,AuthorLast,AuthorFirst,IsPhotographer, Suffix)" _
& " VALUES(&@nCountedValue + 1,@uprefix,@ulast, @ufirst, @ddlistvalue, @usuffix) "

.Parameters.Add("@prefix", uprefix)
.Parameters.Add("@AuthorLast", ulast)
.Parameters.Add("@AuthorFirst", ufirst)
.Parameters.Add("@IsPhotographer", ddlistvalue)
.Parameters.Add("@Suffix", usuffix)
.Connection = DaContributor.SelectCommand.Connection
End With
 
Back
Top