473,394 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Vbscript error Object required:'server'

the below is my part of


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

strCS = "Provider=System.Data.SqlClient; Data Source=" & _
Server.MapPath("management.mdb")& ";"

cn.open strCS

cn.Execute "INSERT INTO contract_coverage ([coverage_id], [contract_coverage]) VALUES (1111,'hi')"
cn.close

when executed the error "OBject required:'server'" occurs in the first line. I am not sure why this occurs.Can please anyone help me?
Oct 11 '07 #1
3 12332
debasisdas
8,127 Expert 4TB
Moved to Visual Basic forum.
Oct 12 '07 #2
QVeen72
1,445 Expert 1GB
the below is my part of


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

strCS = "Provider=System.Data.SqlClient; Data Source=" & _
Server.MapPath("management.mdb")& ";"

cn.open strCS

cn.Execute "INSERT INTO contract_coverage ([coverage_id], [contract_coverage]) VALUES (1111,'hi')"
cn.close

when executed the error "OBject required:'server'" occurs in the first line. I am not sure why this occurs.Can please anyone help me?
Hi,

Somewhat confused here.. You have mentioned provider as SQL Client, but are refering to an Access DB.
ConnString for Access is :

"PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("mydatabase.mdb")

Regards
Veena
Oct 12 '07 #3
hi QVeen72,
Thanks for ur reply.i found ou the error ,the eroor was due to Server.Createobject line, because i was running the script from windows and so it must be Wscript.Createobject.Sorry for wasting all of your time.Thank you Again QVeen72

Hi,

Somewhat confused here.. You have mentioned provider as SQL Client, but are refering to an Access DB.
ConnString for Access is :

"PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("mydatabase.mdb")

Regards
Veena
Oct 12 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Anupama | last post by:
Hi We have a desgined a web application with ASP, VB, Oracle, Javascript. Ours is a three tier applicaton with the component proxy exported to IIS on the web server. We have the error...
3
by: Apostolis K. | last post by:
At first I make a independend virtual directory wich I named app and I check Directory Browsing in the Virtual Directory Properties. Then I create with notepad global.asa and index.asp ...
4
by: Oli | last post by:
Hi Hope someone can help: <% set rsProdInfo = Server.CreateObject("ADODB.Recordset") rsProdInfo.Open "TBL_Products", Conn intTotal = 0
0
by: Pablo | last post by:
Hi, I am sometimes getting a error ('Object required') in my ASP script like this: .... 1 On Error resume next 2 dim loCOM 3 set loCOM = createobject("MyComponent.Object") 4...
1
by: Carolyn Speakman | last post by:
Hi, I'm trying to amend an intranet .asp page but keep getting this error. The error only occurs when I pull the WHOLE intranet off the server and try to run it locally. The error isn't there...
1
by: Lam | last post by:
the internet explorer always give me some error " Object Required : Request Code . 0" " on some ASP pages I try so look it up on the code, but I couldn't find anything wrong FireFox and ...
4
by: Phil | last post by:
Hi, This code gives an javascript error: "Object required" and never let see the Alert window. in code-behind: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As...
7
by: Raj | last post by:
I have developed a component create database, sql login,pwd, create tables etc., The component is working fine with VB But the same is not working with ASP as I get this error: Error 800a01a8...
4
by: Genken | last post by:
Hi can anybody help me i get this error when running this code. Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' And then a line number indicating where the error is, i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.