Current location: Hot Scripts Forums » Programming Languages » ASP » asp + JScript


asp + JScript

Reply
  #1 (permalink)  
Old 10-07-03, 09:56 AM
azwani azwani is offline
New Member
 
Join Date: Oct 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Red face asp + JScript

I'm a new learner of JScript.can anyone give me source code how to retrieve data from database using JScript + asp.It's a bit different from VBScript right..
Reply With Quote
  #2 (permalink)  
Old 10-07-03, 11:07 PM
Shane Shane is offline
Coding Addict
 
Join Date: Jun 2003
Location: Maryland, US
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by azwani
I'm a new learner of JScript.can anyone give me source code how to retrieve data from database using JScript + asp.It's a bit different from VBScript right..
Same code, different syntax.

www.coveryourasp.com has code in jscript.
__________________
Shane Bauer
Microsoft Certified Professional (MCP) - ASP.NET
ASP/ASP.net, C#, VB/VB.NET, PHP, Perl, SQL
Reply With Quote
  #3 (permalink)  
Old 10-07-03, 11:08 PM
azwani azwani is offline
New Member
 
Join Date: Oct 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
this is my source code -->

// connect to database
conn = Server.CreateObject("ADODB.Connection");
conn.Open("DSN=metadata;UID=;PWD=");



Obrs = objConn.Execute ("Select linkxml From metatag " &_
"Where Discipline='"& "disp &"'" &_
"And Author='"& author &"'");

and this the error i've got -->

Error Type:
Microsoft JScript compilation (0x800A03EE)
Expected ')'
/LOM/mainmenu.asp, line 32
"Where Discipline='"& "disp &"'" &_


i'm used to VBScript but not JScript
Reply With Quote
  #4 (permalink)  
Old 10-07-03, 11:16 PM
Shane Shane is offline
Coding Addict
 
Join Date: Jun 2003
Location: Maryland, US
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by azwani
this is my source code -->

// connect to database
conn = Server.CreateObject("ADODB.Connection");
conn.Open("DSN=metadata;UID=;PWD=");



Obrs = objConn.Execute ("Select linkxml From metatag " &_
"Where Discipline='"& "disp &"'" &_
"And Author='"& author &"'");

and this the error i've got -->

Error Type:
Microsoft JScript compilation (0x800A03EE)
Expected ')'
/LOM/mainmenu.asp, line 32
"Where Discipline='"& "disp &"'" &_


i'm used to VBScript but not JScript
Make everything one line (I'm not sure if you can use the _ is jscript). Also, replace the & with a + .
__________________
Shane Bauer
Microsoft Certified Professional (MCP) - ASP.NET
ASP/ASP.net, C#, VB/VB.NET, PHP, Perl, SQL
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mac IE / jscript / menu not showing HELp!! chris-kf JavaScript 0 09-22-03 06:04 AM


All times are GMT -5. The time now is 03:41 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.