Calling Vbscript From SP

Apr 21, 2004

I am trying to call a VB script file with the following command,

xp_cmdshell 'cscript c:file.vbs'

But its giving the following output -

Microsoft (R) Windows Script Host Version 5.1 for Windows
Copyright (C) Microsoft Corporation 1996-1999. All rights reserved.
NULL
Input Error: Can not find script file "c:file.vbs".
NULL
------------
If i changed the command to

xp_cmdshell 'cscript c:file.vbs'

it gives the folowing error -

Input Error: Can not find script file "C:WINNTsystem32file.vbs".


Actually my main intention is to call a url from the sql server where '
i can pass some value. Plz let me know if its the right step and whts
going wrong.

Thanks & regards,

-dkoushik

View 4 Replies


ADVERTISEMENT

Calling A DTS (SSIS 2005) From A Vbscript

Jul 12, 2006

Hello,

I would like to run a DTS using a Vbscript, i managed to get the DTS running, but i would like to pass the value of a global variable, but im having lots of dificulties.

Since it is a VBS i only have access to the things registered on the registry of the machine, so i don't have access to the microsoft.sqlserver.dts.runtime, at is maximum.

So i do the following





Set objApplication = CreateObject("MSDTS.Application")



Set objDTSPackage = objApplication.LoadPackage("T.dtsx", True, Nothing)



'This should pass the variable but insted i have an error



set pkgVars = objDTSPackage.Variables

set myVar = objDTSPackage.Variables.Add("User::Name", false, "User", "TesteA")

'End of the error part





DTSResults = objDTSPackage.Execute()



The error that i got is the following

"Object doesn't support object or method"



What am i doing wrong?



Thank you

Nuno Ferreira

View 8 Replies View Related

DTS And VBScript

Dec 21, 2004

I have an application written in C#, which allows the user to load their destination schema (in xml format) and writer their transformation expressions either in VBScript or in T-SQL. It uses DTS to do the ETL job.

Everything works great except with one problem. If there is a hypen ("-") in any of the destination attributes, the transformation fails with syntax error. It happens only with VBScript.

Here is my transformation:

"Function Main()

DTSDestination("Field-1") = #01/01/2004#

End Function"

If I replace the hypen with underscore, it works without any problem.

Does anyone have any idea about this problem?

View 4 Replies View Related

Triggers / VBScript

Aug 25, 2004

How do i get my server to run a vbscript (yet to be created but i guess it will be in a DTS package???) when an insert runs on a table?

We need to analyse the browser versions hitting our intranet and catch the ones that are too old (earlier than IE5.5). I have the asp inserting a row with the IP address of the browser but i need to run a command line query to get the machine name from DNS (nslookup 111.222.333.444). This nslookup can be run from a vbscript.

Do i need to used a stored procedure in the process somewhere?

any thoughts welcomed

View 2 Replies View Related

Need DTS/VBScript Guru

Nov 9, 2005

I am trying to write a DTS package at work that uses a loop to fire a query off against a different server/database at each loop iteration. Prior to the execute SQL task , I use ActiveX (VBScript) to change the Catalog and DataSource of the connection (created by drag and drop if icon). My Execute SQL task selects @@servername and getdate() just as a dummy query to make sure I am actually pointed at a different server.

While testing the properties of the connection using global variables and msgbox shows that the database (catalog) and server (data source) ip address is being changed, the result returned is always from the first server. I feel like I need to disconnect the connection object, change the parameters and then reconnect to the new server but there doesn't appear to be anyway to do this.

Anyone out there able to successfully change a connection object inthis manner??

View 1 Replies View Related

VBscript Sleep

Apr 28, 2004

im writing a DTS package and i have am using vbscript to check if a file exists on an ftp server.

I can't figure out how to make my process sleep b/t checks on if the file exists.

in vb u can just

Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

but i cant seem to find a counterpart in vbscript.

thanks in advance,
pete

View 8 Replies View Related

Disabling Job Using VBScript

Jun 6, 2008

I have an SQL job that runs a .vbs script. It has the following code:

Cmd2.ActiveConnection = Conn2
Cmd2.CommandText = "USE msdb EXEC sp_update_job @job_name = 'Email Download',@enabled = 0"
Cmd2.CommandType = 1
Cmd2.Execute()

It's not disabling the job. If I execute in Query Analyzer, it works. I'm thinking it might be a permissions issue. Any suggestions?

TIA

View 10 Replies View Related

Using SQL -DMO And Vbscript Against SQL Server

Jun 12, 2003

I'm trying to run a TQSL script against a SQL Server 2000 database using SQL-DMO and Vbscript. The output of this query would be use to populate a table in another SQL Server database on a different server. Has anyone use SQL-DMO to connect SQL Server and run a t-sql script against a database and use the output to populate a table on a different server? Any informatiom would be helpfull.


Regards

Magictech

View 4 Replies View Related

How To Schedule Job To Run Vbscript File

Aug 30, 2005

Hi All,I wrote a vbscript file which copies one table records to another database table.  I wrote error handling to send an email if error occurs when copying records from one table to another.  I want to schedule a sql job and give this file to execute.  Could anyone plz tell me how to schedule sql job which runs vbscript file.  i selected ActiveXScript and choose vbscript and gave path.  I'm not understanding what the command should be given to run vbscript file.  The result of giving path is job is failing.Any help would be appreciated...plzzzzzzzthankscarol

View 1 Replies View Related

Is There AT-SQL Function Like VBScript STRING() ?

Aug 11, 2000

This function is useful for fixed width output. E.g.

String(expr,10-len(expr),'0') will give you a number with leading zeros so it is always 10 characters long.

Thanks in advance for your time.

View 1 Replies View Related

Auto Increment In VBScript?

Aug 31, 2006

Ok, I've been charged with the task of setting up an IVR(interactive voice response) system for remote data entry. It was all going great till I got to the utility's Database connector. It wouldn't work, but I saw that the program also supported VBScript, great! I know VBScript.

Simple task, setup a simple flow where data can be entered. I setup a DSN for the access database(not quite MS SQL, but close enough) I'd created. It gave me a syntax error when I tried to use '' in an auto increment field. I think the exact query was:
"INSERT INTO test_table VALUES('',$RV[Store Number],'$RV[Objective]','question1','question2',question3');"

The database setup was:
id(AutoNumber),store_number(number),objective(text),q1(text),q2(text),q3(text)

Changed the auto number in the query to a 0 and it worked fine, but of course it was only to test if it would work. It would create a duplicate row if it went further than the first row.

I don't understand what my syntax error was. The $RV[*] are variables retrieved by procedures in the IVR scripting program. Need this for work so I can setup a demo of the system to present to my boss' bosses' bosses

View 1 Replies View Related

Stored Procedure From VBScript

Oct 7, 2004

Hello,

I am trying to call a Stored Procedure from VBScript. It worked fine the first time but each time after it doesn't seem to be returning any data is there any special command I need to send?

Thanks in Advance,

John

View 3 Replies View Related

DTS / VBScript Date Format

Mar 31, 2008

Hey guys,
I have a database import that I'm doing and I'm using DTS/VBscript to manipulate data.

I created a varchar field to import a date in the following format 030906.
Does anyone have a suggestion on making it 03/09/06?
Or just the best way to handle this type of data

thanks,

Jonathan

View 4 Replies View Related

VBScript Error In SQL2000

Mar 28, 2004

hi

I have a VBScript converted from an AccessDB Macro to VB.

Option Compare Database

'------------------------------------------------------------
' Macro2_Export2Text5
'
'------------------------------------------------------------
Function Macro2_Export2Text5()
On Error GoTo Macro2_Export2Text5_Err

DoCmd.TransferText acExportDelim, "", "MTHCrosstabCountingUnits", "c:IMSMthCountingUnit.txt", True, ""
DoCmd.TransferText acExportDelim, "", "MTHCrosstabValue", "c:IMSMTHValue.txt", True, ""
DoCmd.TransferText acExportDelim, "", "MATCrosstabValue", "c:IMSMatValue.txt", True, ""
DoCmd.TransferText acExportDelim, "", "MATCrosstabCountingUnits", "c:IMSMATCountingUnit.txt", True, ""


Macro2_Export2Text5_Exit:
Exit Function

Macro2_Export2Text5_Err:
MsgBox Error$
Resume Macro2_Export2Text5_Exit

End Function

What I am trying to do is instead of Opening the Access application and run the macro manually, i converted the macro to VB and created an ActiveX Script Task package in SQL2000 and Copy and Paste the VB Code to ActiveX Script Task. But it didn't work. Is there a work around for this?

Many thanks in advance.

View 3 Replies View Related

How To Run Stored Proc From Vbscript

Oct 1, 2013

I have a stored procedure that I run in Management studio just fine. I need to provide 2 integer variables @id and @version.How do I run the stored proc from vbscript and reading the output?

SP:
USE [ProjectBudget]
GO

DECLARE @return_value int,
@name varchar(500),
@maconomy varchar(100),
@creator varchar(100),
@created datetime,
@active bit

[code]....

View 1 Replies View Related

Compare Two Databases Using Vbscript

Sep 9, 2004

How to compare db2 and sql7 database using VB script

View 2 Replies View Related

Bulk Insert Using ASP/VBscript?

Jan 5, 2007

Hi!

I'm trying to insert rows into an SQL Server table using a semicolon-separated text file as the source. The file continues approximately 4000 rows and I use the readLine() function to get the data ready for insert.

After reading a line I insert the row into SQL Server using a normal INSERT statement. I have tried this using only 100 test lines nand everything worked OK, but the first time I tried inserting all 4000 the web server seemed to go down.

Is this because SQL Server is not capable of such a bulk insert via web?
Is there something I could do to makes this easier?

View 5 Replies View Related

VBscript To Trigger A SQL Back Up?

Aug 14, 2007

Hi guys. I'm now stuck with something and wondering if anyone can shed me some lights.
I'm now building a backup procedure for an application (business objects), and the sequence is
1) stop the service of the application
2) SQL backs up the database and at the same time, copy a folder to a backup location
3) restart the service of the application

I've come up with the scripts to stop/start the service and copy the folder to a backup location. Now, my boss wants me to put everything into a single procedure, but I have no clue how. My question is how do I trigger a SQL backup after the script stops the service of the application?

View 8 Replies View Related

Getting Data From SQL Server Using VBScript

Aug 21, 2007

Hello All

I want to fetch data from SQL Server using VB Script. Can any one please send me any sample code or article.

Looking forward for your help

Amir

View 9 Replies View Related

Executing A DTS Package Using An ASP (VBScript)

Jul 23, 2005

I'm looking for an example of how to execute an existing DTS* packagefrom anASP (VB)script and would appreciate any and all response. *I don'tevenknow if it's possibleThanks- Chuck GattoDan Guzman Apr 27 2000, 12:00 am show optionsNewsgroups: comp.databases.ms-sqlserverFrom: "Dan Guzman" <DGuz...@nospamplease-earthlink.net&g*t; - Findmessages by this authorDate: 2000/04/27Subject: Re: Executing a DTS Package using an ASP (VBScript) ScriptReply to Author | Forward | Print | Individual Message | Show original| Report AbuseThis VBScript example loads and executes an existing DTS pac*kage fromSQLServer.Option ExplicitConst PackageName = "PackageName"Const ServerName = "ServerName"Const UserName = "UserName"Const Password = "Password"Dim DTSPkSet DTSPk = CreateObject("dts.package")DTSPk.LoadFromSQLServer ServerName, UserName ,Password,,,,,*PackageNameDTSPk.ExecuteIf DTSPk.Steps(1).ExecutionResult = 0 ThenResponse.Write "Package execution completed"ElseResponse.Write "Package execution failed"End IfSet DTSPk = NothingYou can also create the entire package from scratch from wit*hin yourasp andexecute it.Hope this helps.Chuck Gatto <cga...@anchorsystems.com> wrote in messagenews:8eapo8$frj$1@slb7.atl.mindspring.net...- Hide quoted text -- Show quoted text -[color=blue]> I'm looking for an example of how to execute an existing D*TS[/color]package froman[color=blue]> ASP (VB)script and would appreciate any and all response.* I don't[/color]even[color=blue]> know if it's possible> Thanks> - Chuck Gatto[/color]Chuck Gatto May 1 2000, 12:00 am show optionsNewsgroups: comp.databases.ms-sqlserverFrom: "Chuck Gatto" <cga...@anchorsystems.com> - Find messages by thisauthorDate: 2000/05/01Subject: Re: Executing a DTS Package using an ASP (VBScript) ScriptReply to Author | Forward | Print | Individual Message | Show original| Report AbuseBelow code works 100% in VB but the load fails in ASP. I g*et..."Microsoft OLE DB Provider for SQL Server. Login failed for *user "".error.I think the IIS (server a) is set for NT auth. and sql7 (on *server b)aswell but I can't be sure.Any idea what I should look for.Thanks"Dan Guzman" <DGuz...@nospamplease-earthlink.net> wrote in m*essagenews:sgi3hi617qo89@corp.supernews.com...- Hide quoted text -- Show quoted text -[color=blue]> This VBScript example loads and executes an existing DTS p*ackage[/color]from SQL[color=blue]> Server.[/color][color=blue]> Option Explicit> Const PackageName = "PackageName"> Const ServerName = "ServerName"> Const UserName = "UserName"> Const Password = "Password"> Dim DTSPk> Set DTSPk = CreateObject("dts.package")> DTSPk.LoadFromSQLServer ServerName, UserName ,Password[/color],,,*,,PackageName[color=blue]> DTSPk.Execute> If DTSPk.Steps(1).ExecutionResult = 0 Then> Response.Write "Package execution completed"> Else> Response.Write "Package execution failed"> End If> Set DTSPk = Nothing[/color][color=blue]> You can also create the entire package from scratch from w*ithin[/color]your aspand[color=blue]> execute it.[/color][color=blue]> Hope this helps.[/color][color=blue]> Chuck Gatto <cga...@anchorsystems.com> wrote in message> news:8eapo8$frj$1@slb7.atl.mindspring.net...[color=green]> > I'm looking for an example of how to execute an existing* DTS[/color][/color]packagefrom[color=blue]> an[color=green]> > ASP (VB)script and would appreciate any and all respons*e. I[/color][/color]don't even[color=blue][color=green]> > know if it's possible> > Thanks> > - Chuck Gatto[/color][/color]Dan Guzman May 1 2000, 12:00 am show optionsNewsgroups: comp.databases.ms-sqlserverFrom: "Dan Guzman" <DGuz...@nospamplease-earthlink.net&g*t; - Findmessages by this authorDate: 2000/05/01Subject: Re: Executing a DTS Package using an ASP (VBScript) ScriptReply to Author | Forward | Print | Individual Message | Show original| Report AbuseYou can specify a trusted connection with flag 256 instead o*fusername andpassword. For example:DTSPk.LoadFromSQLServer ServerName, , , 256,,,,PackageNa*meAssuming this is an intranet application running under NT 4.*0 and youwantto execute the package under the invoking user's account, yo*u can dothis asfollows:Specify 'clear text' for the IIS Directory Securityauth*enticationRemove 'Everyone' from the access list on the files (req*uiresNTFS) andgrant permissions to the usersGrant logins access to the database serverWith this method, users must enter their DomainUserName and* passwordwhenprompted.NT authentication presents a challenge when multiple servers* areinvolvedbecause NT 4.0 does not support delegation. Seehttp://msdn.microsoft.com/workshop/...re/security.asp fordetails.I understand Windows 2000 provides delegation capabilities b*ut thiscan be abit tricky to implement.BTW, if your DTS package does not access SQL Server, you can* save itto afile and use the LoadFromStorageFile method instead.Hope this helps.If you need to useChuck Gatto <cga...@anchorsystems.com> wrote in messagenews:8ekrkd$pmq$1@slb7.atl.mindspring.net...- Hide quoted text -- Show quoted text -[color=blue]> Below code works 100% in VB but the load fails in ASP. I* get...> "Microsoft OLE DB Provider for SQL Server. Login failed fo*r user[/color]"".error.[color=blue]> I think the IIS (server a) is set for NT auth. and sql7 (o*n server[/color]b) as[color=blue]> well but I can't be sure.> Any idea what I should look for.> Thanks[/color]Chuck Gatto May 6 2000, 12:00 am show optionsNewsgroups: comp.databases.ms-sqlserverFrom: "Chuck Gatto" <cga...@anchorsystems.com> - Find messages by thisauthorDate: 2000/05/06Subject: Re: Executing a DTS Package using an ASP (VBScript) ScriptReply to Author | Forward | Print | Individual Message | Show original| Report AbuseHey DanThanks again. I really appreciate your input and help.I actually solved the problem by calling dtsrun...I apologize for the delay getting back w/you but thee recent* virusatacksidetracked me.Thanks again."Dan Guzman" <DGuz...@nospamplease-earthlink.net> wrote in m*essagenews:sgsfh8spoog87@corp.supernews.com...- Hide quoted text -- Show quoted text -[color=blue]> You can specify a trusted connection with flag 256 instead* of[/color]username and[color=blue]> password. For example:[/color][color=blue]> DTSPk.LoadFromSQLServer ServerName, , , 256,,,,Package*Name[/color][color=blue]> Assuming this is an intranet application running under NT *4.0 and[/color]you want[color=blue]> to execute the package under the invoking user's account, *you can[/color]do thisas[color=blue]> follows:[/color][color=blue]> Specify 'clear text' for the IIS Directory Security[/color]au*thentication[color=blue]> Remove 'Everyone' from the access list on the files (r*equires[/color]NTFS)and[color=blue]> grant permissions to the users> Grant logins access to the database server[/color][color=blue]> With this method, users must enter their DomainUserName a*nd[/color]password when[color=blue]> prompted.[/color][color=blue]> NT authentication presents a challenge when multiple serve*rs are[/color]involved[color=blue]> because NT 4.0 does not support delegation. See> http://msdn.microsoft.com/workshop/...re/security.asp for[/color]details.[color=blue]> I understand Windows 2000 provides delegation capabilities* but this[/color]can bea[color=blue]> bit tricky to implement.[/color][color=blue]> BTW, if your DTS package does not access SQL Server, you c*an save[/color]it to a[color=blue]> file and use the LoadFromStorageFile method instead.[/color][color=blue]> Hope this helps.[/color][color=blue]> If you need to use> Chuck Gatto <cga...@anchorsystems.com> wrote in message> news:8ekrkd$pmq$1@slb7.atl.mindspring.net...[color=green]> > Below code works 100% in VB but the load fails in ASP. * I get...[/color][/color][color=blue][color=green]> > "Microsoft OLE DB Provider for SQL Server. Login failed *for user[/color][/color]"".[color=blue]> error.[color=green]> > I think the IIS (server a) is set for NT auth. and sql7 *(on[/color][/color]server b) as[color=blue][color=green]> > well but I can't be sure.> > Any idea what I should look for.> > Thanks[/color][/color]chris.duni...@agwsha.nhs.uk Jan 31, 10:05 am show optionsNewsgroups: comp.databases.ms-sqlserverFrom: chris.duni...@agwsha.nhs.uk - Find messages by this authorDate: 31 Jan 2005 10:05:00 -0800Subject: Re: Executing a DTS Package using an ASP (VBScript) ScriptReply | Reply to Author | Forward | Print | Individual Message | Showoriginal | Report AbuseHi,I've tried adding this function to my ASP pages and get the *followingerror message;Microsoft VBScript runtime error '800a01ad'ActiveX component can't create object: 'DTS.Package'/asp/pages/dts.asp, line 21Does anyone have any idea what I need to fix to get the DTS *to work?I'm v. new to SQL Server and ASP so any help would be apprec*iated.Many thanks, Chris Dunigan

View 4 Replies View Related

ActiveX VBScript Problem

Jul 20, 2005

Below is a code snippet that is throwing the following error:Error Source: Microsoft DTS PackageError Description: Error Code: 0Error Source= Microsoft VBScript runtime errorError Description: Object required: 'Server'Error on line 13In my code line 13 is the following:Set Cnxn = Server.CreateObject("ADODB.connection")I did set up a Microsoft OLE DB connection in my DTS package for thisActiveX Task. I'm new to VBScript and ActiveX. Any help would beappreciated.Thanks,-p'************************************************* *********************' Visual Basic ActiveX Script'************************************************* ***********************Function Main()Main = DTSTaskExecResult_Success' connection, command and recordset variablesDim Cnxn, strCnxn' create and open connectionSet Cnxn = Server.CreateObject("ADODB.connection")strCnxn = "data source=Pluto;initial catalog=Stats;User Id=sa;password=;"Cnxn.Open strCnxnEnd Function

View 2 Replies View Related

Where Can I Execute ActiveX/vbscript?

Sep 19, 2007



I have a DTS package which executes an ActiveX control written in vbscript. I need to move the ActiveX code out of the DTS environment. The code is too big to execute in a Sql Server Job Step as type "ActiveX Script." Do I have any other easy options?


Thanks,

Michael

View 4 Replies View Related

How Hard Would This Be - Automating With Vbscript ?

Oct 5, 2007

How can I do this with vbscript, or C# ?
- Copy backup files down from a network share, into the data directory of my local sql 2005 instance
- perform a restore using the files copied from above
- Execute a dts package


More info:
Our databases are scripted and exist on the typical development, and testing enviroments. So as I get ready to start a new application, I want my local sql instance to be updated based on structure changes as well as data. So I have to apply the changes from the scripted sources and pull over the data. I would naturally like to automate this.

ideas / suggestions welcome

View 6 Replies View Related

Run Stored Procedure From Vbscript

Mar 6, 2008



Hello,

I am planning to write a vbscript in my DTS package.

I have a procedure call IsAllDataDeleted which returns integer value (0, 1); I want to Invoke this stored procedure in my vbscript and receive the returned value, and base on the returned value I make a decision what to make after

Could somebody drop me someline how to accomplish this

Thanks,

View 1 Replies View Related

Silent Installation Via Vbscript

Aug 21, 2007


Hi..
i am new to vbscripting.i need to create the vbscript for
( .netframework2.0,MDAC2.7,XML4.0,VC++2005,windowsinstaller3.0,OWC10)
with silent installation via VBscript.before that i need to check the
machine have my pre-requisites or not,which machine does not have my
pre-requisites through script i have to install.
Kindly provide any solution for this.you can reach me at
senthil...@tcs.com.
thanks,
N.senthil

View 1 Replies View Related

Silent Install Using VBScript

Mar 19, 2007

Hi,

how do Silent Installation with VBscript ? because I have some step for user interactive.

please anyone put an example about this or put a link to.

thank you very much.

View 6 Replies View Related

Help Using VBScript In An ActiveX Task In DTS Package

Jan 16, 2004

Hi,

Thanks for reading.

I am creating a DTS package to import a .txt file into sql. I have everything in place, but the text file needs to have the last record deleted before the import. I need help with this part

I would like to delete the last record from a fixed width text file before I import it into sql. The number of rows will vary from file to file.

Can any one offer suggestions on the best way to do this.

I understand that I have to use the FSO to open and read the file, but I am not sure the best way to proceed after that.

Thanks in advance,
Steve

View 1 Replies View Related

Instr (vbscript) Function Explanation ???

Jan 15, 2001

I went to Microsoft to find some info about the function Instr. I need to
perform a search with a string similar to their example I found below. Can
anyone explain to me Microsoft's example?? I am little confused by the
parameters used and the explanation it gives back to me??

Dim SearchString, SearchChar, MyPos
SearchString ="XXpXXpXXPXXP" ' String to search in.
SearchChar = "P" ' Search for "P".
MyPos = Instr(4, SearchString, SearchChar, 1) ' A textual comparison
starting at position 4. Returns 6.
MyPos = Instr(1, SearchString, SearchChar, 0) ' A binary comparison
starting at position 1. Returns 9.
MyPos = Instr(SearchString, SearchChar) ' Comparison is binary by default
(last argument is omitted). Returns 9.
MyPos = Instr(1, SearchString, "W") ' A binary comparison starting at
position 1. Returns 0 ("W" is not found).

My problem is this:

I need to scan within SearchString for blanks/spaces characters. When I
find one, then place the values to the left and right of it in seperate
columns. For example, I would need to scan 'John Smith A' and then place
'John' in FirstName column, 'Smith' in LastName column, and 'A' in MidName
column.

I think this is how my code would read, but I am confused on how to place
the results into my table to the correct columns?

my search string would be SearchString = 'John Smith A'
my SearchChar would be SearchChar = ' ' (note I am searching for a
space/blank character)

So would then my code be like:

Dim SearchString, SearchChar, MyPos
SearchString = 'John Smith A'
SearchChar = ' '
MyPos = Instr(1, SearchString, SearchChar, 0)

How do I get whatever is returned from the Instr function to a column in a
table??

Any help would be great.

Rey

View 1 Replies View Related

Unable To Connect MS SQL Server Thru Vbscript In ASP

Jul 25, 2007

Hi All

I'm new to ASP coding and trying to connect to SQL server in ASP thru vbscript.
It works fine in the local machine, but received the "[DBNETLIB][connectionopen[connect().]SQL server does not exist or access denied" in the client machine, can anybody help to sort this out?

connection string

conn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=clnt_user;Password=welcome;Initial Catalog=attendance;Data Source=(local)"

Thanks,
nags.

View 2 Replies View Related

Update Stmt Timesout In VBScript

May 5, 2004

I have a relatively simple update statement that runs fine from Query Analyzer and Enterprise Manager (two rows updated in less than 1 sec) but times out when I run it from a VBScript file.

Any ideas?

Thavalai

View 8 Replies View Related

Connect Using ODBC Connection In Vbscript

Dec 12, 2007

I am trying to connect to a database and run a query using vbscript. The problem I have run into currently is that I can not get the connection to open even though I know the DSN name it still says it can not find it. I am fairly new to vbscript so I am not sure exactly what it is looking for in the connection string so that it will find the database. Any ideas?

View 1 Replies View Related

Connecting To A SQLServerCE Database Through Vbscript

Apr 24, 2007

Is it possible to talk to a SQLServerCE database from a vbs script? If so, does anyone have an example?

Thanks,
Mike

View 1 Replies View Related

Microsoft VBScript Runtime Error

Aug 2, 2006

Hello,

I am currently getting the following error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'QueryString'

/admin/equipment/addequipment.asp, line 128

This is when i try to submit a new database item in Dreamweaver. The DB I am using is SQL Server 2005.

My code is as follows:

Dim equipspec__urlid
equipspec__urlid = "1"
If (QueryString("ID") <> "") Then
equipspec__urlid = QueryString("ID")
End If
%>
<%
Dim equipspec
Dim equipspec_numRows

Set equipspec = Server.CreateObject("ADODB.Recordset")
equipspec.ActiveConnection = MM_intranet_STRING
equipspec.Source = "SELECT * FROM EquipSpec WHERE " + Replace(equipspec__urlid, "'", "''") + " = EquipSpec.ID"
equipspec.CursorType = 0
equipspec.CursorLocation = 2
equipspec.LockType = 1
equipspec.Open()

Would be greatful if anybody could help, let me know if you need more info.

Many thanks.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved