Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 A question about the Insert command

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-10-09 : 12:09:59
Benjamin writes "Hello SQLTeam,

I'm just getting into the ASP & SQL stuff. I'm having trouble with the INSERT command. I use Visual Basic and write my ASP in a ISS project. The name of my DB table is tabel1. The column names are : id,clm1,clm2,clm3
I want to insert the variable kw into clm1, desc into clm2, link into clm3. I have tried to let it work but I keep getting the message that there's a syntax error in my query.
Can you help me? I'd be very gratefull.




My source code looks like this :
------------------------------------------------------

'Declare some vars
Dim cn
Dim rs
Dim ssql
Dim dsn
Dim kw
Dim desc
Dim link

'Get the input from the website
kw = Request.Form("kw")
desc = Request.Form("desc")
link = Request.Form("link")


'Establish DB connection with a DSN link
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "DSN=datalink"

'SQL-query
ssql = "?????????????"
Set rs = cn.Execute(ssql)







rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
Response.Write ("Done")
---------------------------------------End of code -----

Benjamin,"
   

- Advertisement -