Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and MS SQL

Status
Not open for further replies.

aarushi2001

Technical User
Nov 16, 2005
109
US
Hi Guys,

I have been working on this problem since morning and can not find any where solution.

I have a form. When a user hits submit, the information should be stored in a table. I am using MS SQL.

Can someone please provide me with a dummy program on how to 'insert' information?

 
Google is your friend...........

try "SQL INSERT ASP" as the keywords.. you'll be surprised at what you find.

is also a useful site for beginners and will answer your question



A smile is worth a thousand kind words. So smile, it's easy! :)
 
something like this:

Code:
<%
Dim conn, sql
set conn = server.createobject("ADODB.Connection")
conn.open "your connection string here"
sql = " insert into mytable(field1,field2)"&_
      " Values('"request.form("val1")&"',"&_
      " '"&request.form("val2")&"'"
conn.execute(sql)
%>

but as damber suggested...do a search on google for more resources...

-DNG
 
I did do google search before asking for help.. but I get access stuff..

n to be honest I did write the code.. its just not executing.. it gives an error.. n it sems perfectly fine..

thanks for ur help
 
then it would have been better that you showed us your code and also told us what error you were getting...there are many great people in this forum and i am sure that you would have got the answer already...

i would suggest you to read the FAQ that describes about how to post your question...i am not sure about the FAQ number...so please check it in the FAQ section...

-DNG
 
aarushi2001
I did do google search before asking for help.. but I get access stuff..

OK, I'll type the words I noted above into Google for you and provide the link......

You might want to read the VERY FIRST ARTICLE in the results.

Laziness will only proliferate stupidity.... Be one of the clever people, and take a bit of initiative.


A smile is worth a thousand kind words. So smile, it's easy! :)
 
alright, your 4,070,000 wins the count :(

damber said:
Laziness will only proliferate stupidity.... Be one of the clever people, and take a bit of initiative.

I like that one. Think I may need a new signature


General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top