Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 5th, 2005, 01:31 AM
Registered User
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default urgent--vbs

I created a VBS file:
Dim string
Dim cn
Dim rs

string = "Provider=IBMDADB2.1;Hostname=rn-syd-test-04;User ID=sam;password=hebmuller;Data Source=testing"
msgbox string

Set cn = Server.CreateObject("ADODB.Connection")

cn.Open string

Set rs = cn.Execute("create table temp(cl int)")


set cn=nothing
set rs=nothing

but actually an error msg came out and said" object required 'Server'"
the error points to the line " Set cn = Server.CreateObject("ADODB.Connection")"

can anyone give some idea about how to fix it? thanx:)

Old January 5th, 2005, 03:31 AM
Friend of Wrox
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp

When you are writing VBS, you do not need to access server object. This is an object accessible only to ASP pages.

You can just use


Similar Threads
Thread Thread Starter Forum Replies Last Post
.ASP and .VBS misskaos99 Classic ASP Basics 2 January 3rd, 2008 11:36 AM
Simple VBS Email daslick VB How-To 0 November 20th, 2005 07:41 PM
Question on .vbs file savoym VBScript 2 February 24th, 2005 12:12 PM
VBS and FTP red4vbs VBScript 0 January 15th, 2005 12:59 PM
HELP with .VBS file savoym VBScript 1 July 31st, 2003 08:39 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.