Donna,
The issue you are having has nothing to do with the SQL. Dealing with those single and double quotes is just a real pain in the arse.
Minaki,
You are pretty darned close.
what you have with:
INSERT INTO Table (ColumName1, ColName2) VALUES (@Value1, @Value2)
Is the RAW SQL code you will be passing to the SQL server. you will need to declare those @Values bud. I used to use a combination of what you have here and the solution DonnaZ has.
What mine would look like:
strSQL = "DECLARE email NVARCHAR(254) SET email='"& Request.Form("email")&"'"
strSQL = strSQL + " DECLARE band_name NVARCHAR(254) SET band_name)='" & Request.Form("band_name)&"'")
strSQL = strSQL + " INSERT INTO Table (email, band_name) VALUES (@Value1, @Value2);"
All that having been said: Pull your SQL OUT of your code and you will be much happier

. I know there are folks who really, really like writing dynamic SQL inside their aps, I did it for several years, but once I went cold turkey, and pulled out as much of the SQL as possible, I had so much time on my hands I was stunned.
What I would do for this is to create a stored procedure for insert, update, delete. As an example, the INSERT sp might look like this:
DROP PROCEDURE spMySite_User_INSERT
GO
CREATE PROCEDURE spMySite_User_INSERT
@userEmail NVARCHAR(254),
@userName NVARCHAR(254)
AS
INSERT INTO TableUser (email, band_name) VALUES (@userEmail , @userName )
GO
Then in your code your SQL statement looks like this:
Connect.Execute "EXEC spMySite_User_INSERT @userEmail='"&strEmail&"', @userName='"&strBand_name&"';"
Cleaner, more elegant, and you can use that same pice of code over and over again, from any page you want OR any application you want.
Now in ASP.NET the whole thing gets even cooler, because you get to remove all the crud completely.
I build a class for dealing with data including all the connection crud, etc. and in that class have the methods such as INSERT, DELETE, UPDATE, etc. (most of the times it is a single method that dynamically figures our what you aretrying to do based upon table, data passed and a switch)
In an ASP.NET (using C#) page code I use a call like this:
string m = new sqlExecuteSP().spProcessINSERT("INSERT", strEmail, strBand_Name);
Done. The string returned tells me "Success" or "Failure";
That is all the code for it I have on a page : NO SQL!
Now, you do have to do some work on your
sqlExecuteSP class, but that is peanuts compared to hand coding all that SQL in the application pages.
Alright, I'll shut up.