Friday, March 30, 2012
Runtime error / Do you wish to debug -- Unspecified error
We have a database that is using SQL7 and
My local pc = WinXP Pro Ver5.1_sp2
Suspect it is a local setting when I connect for remote access
(Have been using VNC and www.gotoassist.com)
I do not get this error on the other workstation or at the server
I do not connect remote access on the other workstation or at the server
Error will go away when restore from backup (bak)
But will reappear when I connect for remote access again
Windows Server2000 / SQL 7
Visual Studio Debugger unknown exception
Stops at following line
document.all.dbNameTag.innerText = objSQLNSContext.GetDisplayName
(GetParameter("SQLNSCookie"))
function main()
{ document.all.lblLoadingDatabaseInformation.innerText = objSQLNSContex
t.
ProvideLocalizedString("sqlmmc.rll", 4051); document.all.dbNameTag.innerText
= objSQLNSContext.GetDisplayName(GetParameter("SQLNSCookie"))
timer1 = window.setInterval("main2()",1,"JScript");
}
Any ideas why this occurs?
It appears in Enterprise manager after disconnecting either remote access
program listed above.Here is somone else that had same problem we found searching for answers...
[Lew Garrett
Thu, 13 Jun 2002 17:57:28 -0700
I have completed Chapter 17 of Beginning Active Server Pages 3.0 and I have
a
problem that I haven't
been able to solve. Any guidance would be appreciated.
I have the Bank.mdf database installed on two different computers, both
running XP Professional.
Both are running SQL-7 server. When I use the Enterprise Manager mmc snapin
to access SQL-7 and
double-click the database 'Bank', an htm file, "C:\mssql7\html\database.htm"
should be loaded into
Internet Explorer and displayed in the display window. On one machine, it
works fine, on the other, I
get an error message -- unidentified error -- and the htm file fails to load
.
I have traced the error to line 361 of the htm file. This line is embedded i
n
a <script> block within the
file. Specifically, the line is part of function main. I have excerpted this
function and pasted it here.
code-
function main() /* from C:\mssql7\html\database.htm */
{
document.all.lblLoadingDatabaseInformation.innerText = objSQLNSContext.
ProvideLocalizedString
("sqlmmc.rll", 4051);
document.all.dbNameTag.innerText = objSQLNSContext.GetDisplayName
(GetParameter
("SQLNSCookie")) /*line 361 */
timer1 = window.setInterval("main2()",1,"JScript");
}
The comments are mine. It seems that the code is failing when it tries to
access the parameter
"SQLNSCookie". Does anyone out there know what this object is and can you
point me toward some
documentation concerning it.
Thanks in advance,
--Lew
Michael V wrote:
>I hope someone can help us....
>We have a database that is using SQL7 and
>My local pc = WinXP Pro Ver5.1_sp2
>Suspect it is a local setting when I connect for remote access
>(Have been using VNC and www.gotoassist.com)
> I do not get this error on the other workstation or at the serv
er
>I do not connect remote access on the other workstation or at the server
>Error will go away when restore from backup (bak)
>But will reappear when I connect for remote access again
> Windows Server2000 / SQL 7
>Visual Studio Debugger unknown exception
>Stops at following line
>document.all.dbNameTag.innerText = objSQLNSContext.GetDisplayName
>(GetParameter("SQLNSCookie"))
>function main()
> { document.all.lblLoadingDatabaseInformation.innerText = objSQLNSCont
ext.
>ProvideLocalizedString("sqlmmc.rll", 4051); document.all.dbNameTag.innerTex
t
>= objSQLNSContext.GetDisplayName(GetParameter("SQLNSCookie"))
> timer1 = window.setInterval("main2()",1,"JScript");
> }
>Any ideas why this occurs?
>It appears in Enterprise manager after disconnecting either remote access
>program listed above.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...onnect/200508/1sql
Runtime error / Do you wish to debug -- Unspecified error
We have a database that is using SQL7 and
My local pc = WinXP Pro Ver5.1_sp2
Suspect it is a local setting when I connect for remote access
(Have been using VNC and www.gotoassist.com)
I do not get this error on the other workstation or at the server
I do not connect remote access on the other workstation or at the server
Error will go away when restore from backup (bak)
But will reappear when I connect for remote access again
Windows Server2000 / SQL 7
Visual Studio Debugger unknown exception
Stops at following line
document.all.dbNameTag.innerText = objSQLNSContext.GetDisplayName
(GetParameter("SQLNSCookie"))
function main()
{ document.all.lblLoadingDatabaseInformation.innerTe xt = objSQLNSContext.
ProvideLocalizedString("sqlmmc.rll", 4051); document.all.dbNameTag.innerText
= objSQLNSContext.GetDisplayName(GetParameter("SQLNS Cookie"))
timer1 = window.setInterval("main2()",1,"JScript");
}
Any ideas why this occurs?
It appears in Enterprise manager after disconnecting either remote access
program listed above.
Here is somone else that had same problem we found searching for answers...
[Lew Garrett
Thu, 13 Jun 2002 17:57:28 -0700
I have completed Chapter 17 of Beginning Active Server Pages 3.0 and I have a
problem that I haven't
been able to solve. Any guidance would be appreciated.
I have the Bank.mdf database installed on two different computers, both
running XP Professional.
Both are running SQL-7 server. When I use the Enterprise Manager mmc snapin
to access SQL-7 and
double-click the database 'Bank', an htm file, "C:\mssql7\html\database.htm"
should be loaded into
Internet Explorer and displayed in the display window. On one machine, it
works fine, on the other, I
get an error message -- unidentified error -- and the htm file fails to load.
I have traced the error to line 361 of the htm file. This line is embedded in
a <script> block within the
file. Specifically, the line is part of function main. I have excerpted this
function and pasted it here.
code-
function main() /* from C:\mssql7\html\database.htm */
{
document.all.lblLoadingDatabaseInformation.innerTe xt = objSQLNSContext.
ProvideLocalizedString
("sqlmmc.rll", 4051);
document.all.dbNameTag.innerText = objSQLNSContext.GetDisplayName
(GetParameter
("SQLNSCookie")) /*line 361 */
timer1 = window.setInterval("main2()",1,"JScript");
}
The comments are mine. It seems that the code is failing when it tries to
access the parameter
"SQLNSCookie". Does anyone out there know what this object is and can you
point me toward some
documentation concerning it.
Thanks in advance,
--Lew
Michael V wrote:
>I hope someone can help us....
>We have a database that is using SQL7 and
>My local pc = WinXP Pro Ver5.1_sp2
>Suspect it is a local setting when I connect for remote access
>(Have been using VNC and www.gotoassist.com)
> I do not get this error on the other workstation or at the server
>I do not connect remote access on the other workstation or at the server
>Error will go away when restore from backup (bak)
>But will reappear when I connect for remote access again
> Windows Server2000 / SQL 7
>Visual Studio Debugger unknown exception
>Stops at following line
>document.all.dbNameTag.innerText = objSQLNSContext.GetDisplayName
>(GetParameter("SQLNSCookie"))
>function main()
> { document.all.lblLoadingDatabaseInformation.innerTe xt = objSQLNSContext.
>ProvideLocalizedString("sqlmmc.rll", 4051); document.all.dbNameTag.innerText
>= objSQLNSContext.GetDisplayName(GetParameter("SQLNS Cookie"))
> timer1 = window.setInterval("main2()",1,"JScript");
> }
>Any ideas why this occurs?
>It appears in Enterprise manager after disconnecting either remote access
>program listed above.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...nnect/200508/1
Tuesday, March 20, 2012
Running SQL Server DTS Package from ASP.NET page problem
I'm having some problems running a DTS package from my ASP.NET appllication. It runs prefectly in debug from my local machine but as soon as I move it to the web server I receive the following error:
Error: -2147467259
Source: Microsoft JET Database Engine
Description: The Microsoft Jet database engine cannot open the file '\\serverB\PayFiles\Pay3.xls'. It is already opened exclusively by another user, or you need permission to view its data.
The file is not opened by anyone else and the share permissions are full control for everyone.
My set up is as follows
serverA - Webserver & DB Server
serverB - File Server
The DTS package pulls in the file from serverB to a database table on serverA. The sa account is used for the database connection and connecting to the DTS package from the application. My code for running the DTS package is as follows -
Private Sub ExecutePackage(ByVal serverAs String,ByVal packageAs String,ByVal usernameAs String,ByVal passwordAs String)Const DTSSQLStgFlag_Default = 0Const DTSStepExecResult_Failure = 1Dim oPKGAs DTS.Package, oStepAs DTS.Step oPKG =New DTS.PackageDim sServerAs String, sUsernameAs String, sPasswordAs String Dim sPackageNameAs String, sMessageAs String Dim lErrAs Long, sSourceAs String, sDescAs String' Set Parameter Values sServer = server sUsername = username sPassword = password sPackageName = package' Load Package oPKG.LoadFromSQLServer(sServer, sUsername, sPassword, _ DTSSQLStgFlag_Default, , , , sPackageName)' Set Exec on Main ThreadFor Each oStepIn oPKG.Steps oStep.ExecuteInMainThread =True Next' Execute oPKG.Execute()' Get Status and Error MessageFor Each oStepIn oPKG.StepsIf oStep.ExecutionResult = DTSStepExecResult_FailureThen oStep.GetExecutionErrorInfo(lErr, sSource, sDesc) sMessage = sMessage &"Step " & oStep.Name &" Failed<br><br>Error: " & lErr &"<br>Source: " & sSource &"<br>Description: " & sDesc &"<br><br>"Else sMessage = sMessage &"Step " & oStep.Name &" Succeeded<br>"End If Next oPKG.UnInitialize() oStep =Nothing oPKG =Nothing' Display Results 'MsgBox(sMessage) lblOutput.Text = sMessageEnd Sub
I'm using windows authentication with identity impersonate set to true. If I change to use basic authentication and enter my login when I go to the site the DTS package runs successfully. So I assume that I'm seeing this 'double hop' issue.
serverA is for testing so I moved the DTS package and web application to serverB so now everything is on the same server and should eliminate the double hop? No! Works perfectly from my PC in debug, but from the web server the same error occurs. Changing to basic authentication does not workaround the issue on the live server.
The DTS package always works when run from Enterprise manager.
I know this is a premissions issue - does anyone know what I'm doing wrong? Hopefully I've supplied enough info, if not just ask!
You may want to use a windows service instead of a web page, as when the web page stops rendering the process will also stop.
|||If I use a windows service will I still be able to give the user control over when the package is run?
|||I've decided to use a stored procedure and DTSRun to do this instead and then simply execute the stored procedure from my page. Just in case anyone else wants to use it this is my code.
CREATE PROC [dbo].[sp_DTSRun] @.ServerNameVARCHAR(30),@.PackageNameVARCHAR(50)ASBEGINDECLARE @.ReturnValueint, @.Cmdvarchar(500)SET @.ReturnValue = -1SET @.Cmd ='dtsrun /S ' + @.ServerName +' /N ' + @.PackageName +' /E'--' /U "LoginName" /P "password" 'EXECUTE @.ReturnValue = master..xp_cmdshell @.Cmd, NO_OUTPUT--RETURN @.ReturnValueSELECT @.ReturnValue [Result]END
Private Sub ExecutePackage(ByVal serverAs String,ByVal packageAs String)Dim ExecuteAdapterAs New PAY_DAL.RunDTSTableAdapters.sp_DTSRunTableAdapter() ExecuteAdapter.SetCommandTimeOut(0)Dim strResultAs String = ExecuteAdapter.Execute(server, package)Select Case strResultCase 0 lblOutput.Text ="The package executed successfully."Case 1 lblOutput.Text ="The package failed - contact support."Case 2 lblOutput.Text ="2"Case 3 lblOutput.Text ="The package was cancelled by the user."Case 4 lblOutput.Text ="The utility was unable to locate the requested package. The package could not be found."Case 5 lblOutput.Text ="The utility was unable to load the requested package. The package could not be loaded."Case 6 lblOutput.Text ="The utility encountered an internal error of syntactic or semantic errors in the command line."End Select lblOutput.Visible =True End SubJust pass the package and server name in. To use a username and password remove the /E (trusted connection) and add /U and /P.