server.createobject and javascript

Results 1 to 4 of 4

Thread: server.createobject and javascript

  1. #1
    Georgina Guest

    Default server.createobject and javascript

    Hi,<BR><BR>I have been looking at "Paradox&#039s" info on VBScript to Javascript translations and I am having some problems connecting to my database. I am getting the "Javascript error Server is not defined." This makes me think I have not written the code correctly, but it all looks fine to me.<BR><BR>Any Suggestions, Thanks Georgina.<BR><BR>Code follows ....<BR>var DSNStr= "DSN=Corporate;UID=499man;PWD=499man;DATABASE=499M an"<BR>var connection = Server.CreateObject("ADODB.Connection");<BR>connec tion.Open(DSNStr);<BR>var record= Server.CreateObject("ADOBD.Recordset"); <BR>var sqlSelect = "select Organisation, PostalAddress, StreetAddress, Suburb, City, Country, Phone, Fax, Mobile, Email from Sponsor where organisation = org";<BR>record.open(sqlselect,connection);

  2. #2
    Hema S Guest

    Default RE: server.createobject and javascript

    Is it a problem connecting to your database or executing your sql statement(put in single quotes &#039&#039 when you are comparing strings : Sponsor where organisation = &#039org&#039) ..Do post the error & the line it occurs.

  3. #3
    Hema S Guest

    Default RE: server.createobject and javascript

    Is it a problem connecting to your database or executing your sql statement(put in single quotes &#039&#039 when you are comparing strings : where organisation = &#039org&#039) ..Do post the error & the line it occurs.

  4. #4
    Georgina Guest

    Default RE: server.createobject and javascript

    The javascript error is <BR>"Server is not defined. " <BR>in the following line<BR>var connection = Server.CreateObject("ADODB.Connection");<BR><BR>It seems to me that the problem lies with not being able to get a connection.<BR><BR>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •