1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

'800a0401 error- vbscript insert into database

Discussion in 'Databases' started by YSeo, Nov 14, 2009.

  1. #1
    hey guys,

    I have a bit problem to executed a code . please help me.

    this is the code:

    Dim objRS, aConnectionString, DBObj
    sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & Server.MapPath("database1yaniv.mdb")
    Set DBObj=Server.CreateObject("ADODB.Connection")
    DBObj.ConnectionString = ""aConnectionStringDBO" ".Open
    SQLQuery = "INSERT * FROM forms123"
    Set objRS=DBObj.Execute(SQLQuery)
    objRS.AddNew
    objRS.Fields("name") = Request.Form("txtName")
    objRS.Fields("phone") = Request.Form("txtPhone")
    objRS.Fields("email") = Request.Form("txtEmail")
    objRS.Fields("Subject") = Request.Form("ddlSubject")
    objRS.Fields("Content") = Request.Form("txtcontent")
    objRS.Update
    objRS.Close
    Set objRS = nothing
    objConn.Close
    Set objConn = nothing


    this is the error I am getting:

    Microsoft VBScript compilation error '800a0401'

    Expected end of statement

    /Test.asp, line 22

    DBObj.ConnectionString = ""aConnectionStringDBO" ".Open
    ---------------------------^


    thank you so much!
     
    YSeo, Nov 14, 2009 IP