Thursday, March 22, 2012
Couldn't call a procedure
I am using MSSQL-2000. I couldn't call a procedure from a client (windows
98) but its working fine when i call it from window2000 system.
What is the reason for this?
Thanks,
SouraHi,
This will not happen. Even from client you are loging into SQL Server
machine using some tools.
Could you please exactly say how you are calling the procedure.
Thanks
Hari
SQL SERVER MVP
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:0F6D09C0-7057-4651-AEFF-A18C73691659@.microsoft.com...
> Hi,
> I am using MSSQL-2000. I couldn't call a procedure from a client (windows
> 98) but its working fine when i call it from window2000 system.
> What is the reason for this?
> Thanks,
> Soura
>
>|||Hi
Please tell us what is the authentication that u are using.
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"SouRa" wrote:
> Hi,
> I am using MSSQL-2000. I couldn't call a procedure from a client (windows
> 98) but its working fine when i call it from window2000 system.
> What is the reason for this?
> Thanks,
> Soura
>
>
Tuesday, March 20, 2012
Couldn't call a procedure
I am using MSSQL-2000. I couldn't call a procedure from a client (windows
98) but its working fine when i call it from window2000 system.
What is the reason for this?
Thanks,
SouraHi,
This will not happen. Even from client you are loging into SQL Server
machine using some tools.
Could you please exactly say how you are calling the procedure.
Thanks
Hari
SQL SERVER MVP
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:0F6D09C0-7057-4651-AEFF-A18C73691659@.microsoft.com...
> Hi,
> I am using MSSQL-2000. I couldn't call a procedure from a client (windows
> 98) but its working fine when i call it from window2000 system.
> What is the reason for this?
> Thanks,
> Soura
>
>|||Hi
Please tell us what is the authentication that u are using.
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"SouRa" wrote:
> Hi,
> I am using MSSQL-2000. I couldn't call a procedure from a client (windows
> 98) but its working fine when i call it from window2000 system.
> What is the reason for this?
> Thanks,
> Soura
>
>
Couldn't call a procedure
I am using MSSQL-2000. I couldn't call a procedure from a client (windows
98) but its working fine when i call it from window2000 system.
What is the reason for this?
Thanks,
Soura
Hi,
This will not happen. Even from client you are loging into SQL Server
machine using some tools.
Could you please exactly say how you are calling the procedure.
Thanks
Hari
SQL SERVER MVP
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:0F6D09C0-7057-4651-AEFF-A18C73691659@.microsoft.com...
> Hi,
> I am using MSSQL-2000. I couldn't call a procedure from a client (windows
> 98) but its working fine when i call it from window2000 system.
> What is the reason for this?
> Thanks,
> Soura
>
>
|||Hi
Please tell us what is the authentication that u are using.
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
"SouRa" wrote:
> Hi,
> I am using MSSQL-2000. I couldn't call a procedure from a client (windows
> 98) but its working fine when i call it from window2000 system.
> What is the reason for this?
> Thanks,
> Soura
>
>
sql
Could this SP be causing Timeout errors
the adds or updates to several tables. I wanted to do this to tell who made
changes to the records in case we have an issue down the road. After putting
this change in I started to really have a major problems with the system
slowing down. Here is some the tables and procs:
Table TableLog:
MessageId int
Message varchar 500
MessageDate datetime
AppLoggedInUser varchar 100
ComputerName varchar 100
CompLoggedInUser varchar 100
Proc to add new entries:
CREATE PROCEDURE [dbo].[AddTableLog]
@.Message varchar(500),
@.AppLoggedInUser varchar(100),
@.ComputerName varchar(100)
AS
Insert into TableLogs( Message, MessageDate, AppLoggedInUser, ComputerName,
CompLoggedInUser)
Values( @.Message, GetDate(), @.AppLoggedInUser, @.ComputerName, Session_User )
GO
How the above proc is used:
CREATE PROCEDURE [dbo].[nf_AddAttendanceV3_1]
@.PatientId varchar(20),
@.AttendDate datetime,
@.C_ID int,
@.GroupTime varchar(8),
@.Diagnostic tinyint,
@.Program tinyint,
@.AttendedGroup tinyint,
@.DocId int,
@.GroupId int,
@.GroupType Tinyint,
@.ComputerName varchar(100),
@.LoggedInUser varchar(100)
AS
Insert into Attendance (PatientId, AttendDate, C_ID, GroupTime, Diagnostic,
Program, AttendedGroup, GroupType, GroupId, DocId ,CreationDate,
UpdatedBy,ComputerName, LoggedInUser)
values(@.PatientId, @.AttendDate, @.C_ID, @.GroupTime, @.Diagnostic, @.Program,
@.AttendedGroup, @.GroupType, @.GroupId, @.DocId , GetDate(),
Session_User,@.ComputerName, @.LoggedInUser)
Declare @.UserMessage Varchar(500)
select @.UserMessage = 'User ' + @.LoggedInUser + ' has added a attendance
record for PatientId: ' + @.PatientId + ' for attendDate: ' + @.AttendDate
Exec AddTableLog @.UserMessage, @.LoggedInUser, @.ComputerName
GO
Does this look like it could cause the slow down in the system. I backed out
most of the procs that had the call to the Log table, but still have the
issue. If you think this is causing the issue with slow downs or locks, is
there a better way to do this. THanks for any suggestions.
MichaelHope this helps a bit:-
http://omnibuzz-sql.blogspot.com/2006/11/parameter-sniffing-stored-procedures.html
Manu Jaidka
"Michael" wrote:
> The other day I had added a little call to a proc that logged
> the adds or updates to several tables. I wanted to do this to tell who made
> changes to the records in case we have an issue down the road. After putting
> this change in I started to really have a major problems with the system
> slowing down. Here is some the tables and procs:
> Table TableLog:
> MessageId int
> Message varchar 500
> MessageDate datetime
> AppLoggedInUser varchar 100
> ComputerName varchar 100
> CompLoggedInUser varchar 100
> Proc to add new entries:
> CREATE PROCEDURE [dbo].[AddTableLog]
> @.Message varchar(500),
> @.AppLoggedInUser varchar(100),
> @.ComputerName varchar(100)
> AS
> Insert into TableLogs( Message, MessageDate, AppLoggedInUser, ComputerName,
> CompLoggedInUser)
> Values( @.Message, GetDate(), @.AppLoggedInUser, @.ComputerName, Session_User )
> GO
> How the above proc is used:
> CREATE PROCEDURE [dbo].[nf_AddAttendanceV3_1]
> @.PatientId varchar(20),
> @.AttendDate datetime,
> @.C_ID int,
> @.GroupTime varchar(8),
> @.Diagnostic tinyint,
> @.Program tinyint,
> @.AttendedGroup tinyint,
> @.DocId int,
> @.GroupId int,
> @.GroupType Tinyint,
> @.ComputerName varchar(100),
> @.LoggedInUser varchar(100)
> AS
> Insert into Attendance (PatientId, AttendDate, C_ID, GroupTime, Diagnostic,
> Program, AttendedGroup, GroupType, GroupId, DocId ,CreationDate,
> UpdatedBy,ComputerName, LoggedInUser)
> values(@.PatientId, @.AttendDate, @.C_ID, @.GroupTime, @.Diagnostic, @.Program,
> @.AttendedGroup, @.GroupType, @.GroupId, @.DocId , GetDate(),
> Session_User,@.ComputerName, @.LoggedInUser)
> Declare @.UserMessage Varchar(500)
> select @.UserMessage = 'User ' + @.LoggedInUser + ' has added a attendance
> record for PatientId: ' + @.PatientId + ' for attendDate: ' + @.AttendDate
> Exec AddTableLog @.UserMessage, @.LoggedInUser, @.ComputerName
> GO
> Does this look like it could cause the slow down in the system. I backed out
> most of the procs that had the call to the Log table, but still have the
> issue. If you think this is causing the issue with slow downs or locks, is
> there a better way to do this. THanks for any suggestions.
> Michael
>
Could not start the MSSQLServer Service on local computer. Error: 1068: the dependency ser
Win2000 server used to be a member server of a Domain Controller (call it
serverDC with domain name DCName). We had a problem with that Domain
Controller today, so we took out serverA from the domain controller. Now, we
cannot start the SQL Server Service Manager. It gave us an error that says
"Dependency service or group failed to start. Error 1068 (Dependency service
or group failed to start) occured while performing this service operation on
the MSSQLServer Service.".
When I tried to srtart the MSSQLServer Service, it gave me an error "Could
not start the MSSQLServer Service on local computer. Error: 1068: the
dependency service or group failed to start". When I clicked on the tab
"Dependencies", there is no dependency for this service.
On the "Log On" tab of MSSQLServer Service, the user name used to say
"DCName\Administrator", and after we took out serverA from the domain
controller, we changed the user name to "\Administrator".
How can I fix this problem ? Thank you.Try changing the services (SQL Server, SQL Agent, etc) to
run under Local System - from the Log On tab of the service.
You wouldn't necessarily want to keep it set to this but you
can see if it's starts up with the services running under
local system.
-Sue
On Tue, 7 Sep 2004 14:49:06 -0500, "Fie Fie Niles"
<fniles@.wincitesystems.com> wrote:
>We installed SQL Server 2000 on a Win2000 server (call it serverA). This
>Win2000 server used to be a member server of a Domain Controller (call it
>serverDC with domain name DCName). We had a problem with that Domain
>Controller today, so we took out serverA from the domain controller. Now, we
>cannot start the SQL Server Service Manager. It gave us an error that says
>"Dependency service or group failed to start. Error 1068 (Dependency service
>or group failed to start) occured while performing this service operation on
>the MSSQLServer Service.".
>When I tried to srtart the MSSQLServer Service, it gave me an error "Could
>not start the MSSQLServer Service on local computer. Error: 1068: the
>dependency service or group failed to start". When I clicked on the tab
>"Dependencies", there is no dependency for this service.
>On the "Log On" tab of MSSQLServer Service, the user name used to say
>"DCName\Administrator", and after we took out serverA from the domain
>controller, we changed the user name to "\Administrator".
>How can I fix this problem ? Thank you.
>
Monday, March 19, 2012
Could not locate entry in sysdatabases for database
right folder, but DbB wasn't. So I detached DbB, moved it to the new folder
and reattached it. Everything seems to be working (I can see the database
from Management Studio Express (MSE), the website can access it just fine)
except when I try to backup DbB. Backing up from MSE works without a
problem, however if I try to run this query:
BACKUP DATABASE [DbB] TO DISK = N'C:\WebDb.backup\DbB\DbB.bak' WITH
NOFORMAT, NOINIT, NAME = N'DbB-Full Database Backup', SKIP, NOREWIND,
NOUNLOAD, STATS = 10
GO
with this sqlcmd.exe command:
sqlcmd -i c:\WebBackupScripts\BkDbB.sql -o c:\WebBackupScripts\BkDbB.sql.txt
I get this:
Msg 911, Level 16, State 1, Server DEV, Line 1
Could not locate entry in sysdatabases for database 'DbB'. No entry found
with that name. Make sure that the name is entered correctly.
Msg 3013, Level 16, State 1, Server DEV, Line 1
BACKUP DATABASE is terminating abnormally.
The exact same query runs fine from MSE, but fails when ran from sqlcmd --
the sql was actually generated by MSE. A similar query, but for DbA works
fine from sqlcmd. The only thing that I can think of that's different is
that I've attached/reattached DbB. I've searched the net, but nothing
really helped. Any suggestions?
Thank you,
Peter.
Hello,
Do you have multiple instances of SQL Server in the same server. Just issue
the -S Servername parameter along with
SQLCMD statement and try.
Thanks
Hari
"Peter Zolja" <x@.x.com> wrote in message
news:eYTyx4uPHHA.2140@.TK2MSFTNGP03.phx.gbl...
>I have two database, let's call them DbA and DbB. DbA was already in the
>right folder, but DbB wasn't. So I detached DbB, moved it to the new folder
>and reattached it. Everything seems to be working (I can see the database
>from Management Studio Express (MSE), the website can access it just fine)
>except when I try to backup DbB. Backing up from MSE works without a
>problem, however if I try to run this query:
> BACKUP DATABASE [DbB] TO DISK = N'C:\WebDb.backup\DbB\DbB.bak' WITH
> NOFORMAT, NOINIT, NAME = N'DbB-Full Database Backup', SKIP, NOREWIND,
> NOUNLOAD, STATS = 10
> GO
> with this sqlcmd.exe command:
> sqlcmd -i c:\WebBackupScripts\BkDbB.sql -o
> c:\WebBackupScripts\BkDbB.sql.txt
> I get this:
> Msg 911, Level 16, State 1, Server DEV, Line 1
> Could not locate entry in sysdatabases for database 'DbB'. No entry found
> with that name. Make sure that the name is entered correctly.
> Msg 3013, Level 16, State 1, Server DEV, Line 1
> BACKUP DATABASE is terminating abnormally.
>
> The exact same query runs fine from MSE, but fails when ran from sqlcmd --
> the sql was actually generated by MSE. A similar query, but for DbA works
> fine from sqlcmd. The only thing that I can think of that's different is
> that I've attached/reattached DbB. I've searched the net, but nothing
> really helped. Any suggestions?
> Thank you,
> Peter.
>
|||> Do you have multiple instances of SQL Server in the same server. Just
> issue the -S Servername parameter along with
> SQLCMD statement and try.
Ahaaaaaa... right on the money :-) I have SQL 2005 Express and MSDE on the
same machine. SQL2005 is installed under the SQLExpress instance. So adding
"-S .\SQLExpress" to the sqlcmd parameter list made it work. I'm still
puzzled why that wasn't required for DbA... could it be that DbA is the
"default" database?
In any case, thanks a LOT for you help!
|||Hello,
Yes, thats the default instance.
You will have to give the server instance name if you have multiple servers
in one machine.
Thanks
Hari
"Peter Zolja" <x@.x.com> wrote in message
news:%23tu1GEvPHHA.1248@.TK2MSFTNGP03.phx.gbl...
> Ahaaaaaa... right on the money :-) I have SQL 2005 Express and MSDE on the
> same machine. SQL2005 is installed under the SQLExpress instance. So
> adding "-S .\SQLExpress" to the sqlcmd parameter list made it work. I'm
> still puzzled why that wasn't required for DbA... could it be that DbA is
> the "default" database?
> In any case, thanks a LOT for you help!
>
|||Thanks to Hari! You're a life saver. Where were you 5 hours ago?
From http://www.developmentnow.com/g/118_2007_1_0_0_928077/Could-not-locate-entry-in-sysdatabases-for-database.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Sunday, March 11, 2012
Could not locate entry in sysdatabases for database
right folder, but DbB wasn't. So I detached DbB, moved it to the new folder
and reattached it. Everything seems to be working (I can see the database
from Management Studio Express (MSE), the website can access it just fine)
except when I try to backup DbB. Backing up from MSE works without a
problem, however if I try to run this query:
BACKUP DATABASE [DbB] TO DISK = N'C:\WebDb.backup\DbB\DbB.bak' WITH
NOFORMAT, NOINIT, NAME = N'DbB-Full Database Backup', SKIP, NOREWIND,
NOUNLOAD, STATS = 10
GO
with this sqlcmd.exe command:
sqlcmd -i c:\WebBackupScripts\BkDbB.sql -o c:\WebBackupScripts\BkDbB.sql.txt
I get this:
Msg 911, Level 16, State 1, Server DEV, Line 1
Could not locate entry in sysdatabases for database 'DbB'. No entry found
with that name. Make sure that the name is entered correctly.
Msg 3013, Level 16, State 1, Server DEV, Line 1
BACKUP DATABASE is terminating abnormally.
The exact same query runs fine from MSE, but fails when ran from sqlcmd --
the sql was actually generated by MSE. A similar query, but for DbA works
fine from sqlcmd. The only thing that I can think of that's different is
that I've attached/reattached DbB. I've searched the net, but nothing
really helped. Any suggestions?
Thank you,
Peter.Hello,
Do you have multiple instances of SQL Server in the same server. Just issue
the -S Servername parameter along with
SQLCMD statement and try.
Thanks
Hari
"Peter Zolja" <x@.x.com> wrote in message
news:eYTyx4uPHHA.2140@.TK2MSFTNGP03.phx.gbl...
>I have two database, let's call them DbA and DbB. DbA was already in the
>right folder, but DbB wasn't. So I detached DbB, moved it to the new folder
>and reattached it. Everything seems to be working (I can see the database
>from Management Studio Express (MSE), the website can access it just fine)
>except when I try to backup DbB. Backing up from MSE works without a
>problem, however if I try to run this query:
> BACKUP DATABASE [DbB] TO DISK = N'C:\WebDb.backup\DbB\DbB.bak' WITH
> NOFORMAT, NOINIT, NAME = N'DbB-Full Database Backup', SKIP, NOREWIND,
> NOUNLOAD, STATS = 10
> GO
> with this sqlcmd.exe command:
> sqlcmd -i c:\WebBackupScripts\BkDbB.sql -o
> c:\WebBackupScripts\BkDbB.sql.txt
> I get this:
> Msg 911, Level 16, State 1, Server DEV, Line 1
> Could not locate entry in sysdatabases for database 'DbB'. No entry found
> with that name. Make sure that the name is entered correctly.
> Msg 3013, Level 16, State 1, Server DEV, Line 1
> BACKUP DATABASE is terminating abnormally.
>
> The exact same query runs fine from MSE, but fails when ran from sqlcmd --
> the sql was actually generated by MSE. A similar query, but for DbA works
> fine from sqlcmd. The only thing that I can think of that's different is
> that I've attached/reattached DbB. I've searched the net, but nothing
> really helped. Any suggestions?
> Thank you,
> Peter.
>|||> Do you have multiple instances of SQL Server in the same server. Just
> issue the -S Servername parameter along with
> SQLCMD statement and try.
Ahaaaaaa... right on the money :-) I have SQL 2005 Express and MSDE on the
same machine. SQL2005 is installed under the SQLExpress instance. So adding
"-S .\SQLExpress" to the sqlcmd parameter list made it work. I'm still
puzzled why that wasn't required for DbA... could it be that DbA is the
"default" database?
In any case, thanks a LOT for you help!|||Hello,
Yes, thats the default instance.
You will have to give the server instance name if you have multiple servers
in one machine.
Thanks
Hari
"Peter Zolja" <x@.x.com> wrote in message
news:%23tu1GEvPHHA.1248@.TK2MSFTNGP03.phx.gbl...
>> Do you have multiple instances of SQL Server in the same server. Just
>> issue the -S Servername parameter along with
>> SQLCMD statement and try.
> Ahaaaaaa... right on the money :-) I have SQL 2005 Express and MSDE on the
> same machine. SQL2005 is installed under the SQLExpress instance. So
> adding "-S .\SQLExpress" to the sqlcmd parameter list made it work. I'm
> still puzzled why that wasn't required for DbA... could it be that DbA is
> the "default" database?
> In any case, thanks a LOT for you help!
>|||Thanks to Hari! You're a life saver. Where were you 5 hours ago
From http://www.developmentnow.com/g/118_2007_1_0_0_928077/Could-not-locate-entry-in-sysdatabases-for-database.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com
Could not locate entry in sysdatabases for database
right folder, but DbB wasn't. So I detached DbB, moved it to the new folder
and reattached it. Everything seems to be working (I can see the database
from Management Studio Express (MSE), the website can access it just fine)
except when I try to backup DbB. Backing up from MSE works without a
problem, however if I try to run this query:
BACKUP DATABASE [DbB] TO DISK = N'C:\WebDb.backup\DbB\DbB.bak' WITH
NOFORMAT, NOINIT, NAME = N'DbB-Full Database Backup', SKIP, NOREWIND,
NOUNLOAD, STATS = 10
GO
with this sqlcmd.exe command:
sqlcmd -i c:\WebBackupScripts\BkDbB.sql -o c:\WebBackupScripts\BkDbB.sql.txt
I get this:
Msg 911, Level 16, State 1, Server DEV, Line 1
Could not locate entry in sysdatabases for database 'DbB'. No entry found
with that name. Make sure that the name is entered correctly.
Msg 3013, Level 16, State 1, Server DEV, Line 1
BACKUP DATABASE is terminating abnormally.
The exact same query runs fine from MSE, but fails when ran from sqlcmd --
the sql was actually generated by MSE. A similar query, but for DbA works
fine from sqlcmd. The only thing that I can think of that's different is
that I've attached/reattached DbB. I've searched the net, but nothing
really helped. Any suggestions?
Thank you,
Peter.Hello,
Do you have multiple instances of SQL Server in the same server. Just issue
the -S Servername parameter along with
SQLCMD statement and try.
Thanks
Hari
"Peter Zolja" <x@.x.com> wrote in message
news:eYTyx4uPHHA.2140@.TK2MSFTNGP03.phx.gbl...
>I have two database, let's call them DbA and DbB. DbA was already in the
>right folder, but DbB wasn't. So I detached DbB, moved it to the new folder
>and reattached it. Everything seems to be working (I can see the database
>from Management Studio Express (MSE), the website can access it just fine)
>except when I try to backup DbB. Backing up from MSE works without a
>problem, however if I try to run this query:
> BACKUP DATABASE [DbB] TO DISK = N'C:\WebDb.backup\DbB\DbB.bak' WITH
> NOFORMAT, NOINIT, NAME = N'DbB-Full Database Backup', SKIP, NOREWIND,
> NOUNLOAD, STATS = 10
> GO
> with this sqlcmd.exe command:
> sqlcmd -i c:\WebBackupScripts\BkDbB.sql -o
> c:\WebBackupScripts\BkDbB.sql.txt
> I get this:
> Msg 911, Level 16, State 1, Server DEV, Line 1
> Could not locate entry in sysdatabases for database 'DbB'. No entry found
> with that name. Make sure that the name is entered correctly.
> Msg 3013, Level 16, State 1, Server DEV, Line 1
> BACKUP DATABASE is terminating abnormally.
>
> The exact same query runs fine from MSE, but fails when ran from sqlcmd --
> the sql was actually generated by MSE. A similar query, but for DbA works
> fine from sqlcmd. The only thing that I can think of that's different is
> that I've attached/reattached DbB. I've searched the net, but nothing
> really helped. Any suggestions?
> Thank you,
> Peter.
>|||> Do you have multiple instances of SQL Server in the same server. Just
> issue the -S Servername parameter along with
> SQLCMD statement and try.
Ahaaaaaa... right on the money :-) I have SQL 2005 Express and MSDE on the
same machine. SQL2005 is installed under the SQLExpress instance. So adding
"-S .\SQLExpress" to the sqlcmd parameter list made it work. I'm still
puzzled why that wasn't required for DbA... could it be that DbA is the
"default" database?
In any case, thanks a LOT for you help!|||Hello,
Yes, thats the default instance.
You will have to give the server instance name if you have multiple servers
in one machine.
Thanks
Hari
"Peter Zolja" <x@.x.com> wrote in message
news:%23tu1GEvPHHA.1248@.TK2MSFTNGP03.phx.gbl...
> Ahaaaaaa... right on the money :-) I have SQL 2005 Express and MSDE on the
> same machine. SQL2005 is installed under the SQLExpress instance. So
> adding "-S .\SQLExpress" to the sqlcmd parameter list made it work. I'm
> still puzzled why that wasn't required for DbA... could it be that DbA is
> the "default" database?
> In any case, thanks a LOT for you help!
>|||Thanks to Hari! You're a life saver. Where were you 5 hours ago?
From http://www.developmentnow.com/g/118...or-database.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Friday, February 24, 2012
Could not complete cursor operation because the set options have changed since the cursor was de
I'm trying to implement a sp_MSforeachsp howvever when I call sp_MSforeach_worker
I get the following error can you please explain this problem to me so I can over come the issue.
Msg 16958, Level 16, State 3, Procedure sp_MSforeach_worker, Line 31
Could not complete cursor operation because the set options have changed since the cursor was declared.
Msg 16958, Level 16, State 3, Procedure sp_MSforeach_worker, Line 32
Could not complete cursor operation because the set options have changed since the cursor was declared.
Msg 16917, Level 16, State 1, Procedure sp_MSforeach_worker, Line 153
Cursor is not open.
here is the stored procedure:
Alter PROCEDURE [dbo].[sp_MSforeachsp]
@.command1 nvarchar(2000)
, @.replacechar nchar(1) = N'?'
, @.command2 nvarchar(2000) = null
, @.command3 nvarchar(2000) = null
, @.whereand nvarchar(2000) = null
, @.precommand nvarchar(2000) = null
, @.postcommand nvarchar(2000) = null
AS
/* This procedure belongs in the "master" database so it is acessible to all databases */
/* This proc returns one or more rows for each stored procedure */
/* @.precommand and @.postcommand may be used to force a single result set via a temp table. */
declare @.retval int
if (@.precommand is not null) EXECUTE(@.precommand)
/* Create the select */
EXECUTE(N'declare hCForEachTable cursor global for
SELECT QUOTENAME(SPECIFIC_SCHEMA)+''.''+QUOTENAME(ROUTINE_NAME)
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = ''PROCEDURE''
AND OBJECTPROPERTY(OBJECT_ID(QUOTENAME(SPECIFIC_SCHEMA)+''.''+QUOTENAME(ROUTINE_NAME)), ''IsMSShipped'') = 0 '
+ @.whereand)
select @.retval = @.@.error
if (@.retval = 0)
EXECUTE @.retval = [dbo].sp_MSforeach_worker @.command1, @.replacechar, @.command2, @.command3, 0
if (@.retval = 0 and @.postcommand is not null)
EXECUTE(@.postcommand)
RETURN @.retval
GO
example useage:
EXEC sp_MSforeachsp @.command1="PRINT '?' GRANT EXECUTE ON ? TO [superuser]"
GO
Does anyone have a solution to this problem? Please help......Could not bind a SQL Server 2005 Web Service to DataGridView when creating Web Service Client in
Hello,
I would like to develop a minimal Web Service Client in Visual Studio (C#) which call a Web Service created in SQL Server 2005. I have definied a simple stored procedure and a HTTP endpoint which are both working.
In Visual Studio 2005 Pro I proceed following steps:
- New application (C#) Add web reference to the project (http://localhost:8084/Produktdaten?wsdl) Add DataGridView to the form1 in the designer window Configure DataGridView Data Source by selecting "other data sources" - "project data sources" - "localhost" and "produktdaten". In the Form1 (Designer View) the columns "EnableDecompress" ... appears. I could not select my expected web method "GetProduct" definied in the stored procedure.
Afterwards I tried to solve the problem manually with the following code (form1.cs). I could compile this windows application succesfully. When I started the corresponding.exe file I got an error. In the debugging mode problems were reported with the line "dataGridView1.DataMember = "Product";". In the SQL Server database (AdventureWorks) the product table belongs to the schema production. Also with production.product the code listed below did not work.
Could you please help to get this simple web service client running.
Best regards,
Wolfgang
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace AWProductWebServiceClient
{
publicpartialclassForm1 : Form
{
public Form1()
{
InitializeComponent();
localhost.Produktdaten ws = new localhost.Produktdaten();
dataGridView1.DataSource = ws.GetProduct();
dataGridView1.DataMember = "Product";
}
privatevoid dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}
Wolfgang,
In general, you can not directly assign the result from the SQL Server 2005 Native Web Services web method as the data source to a dataGridView.
BTW, you do not need to configure the DataGridView data source at design time.
If the stored procedure was mapped to the endpoint WITHOUT the keyword "FORMAT = ROWSETS_ONLY", then the result of the stored procedure is an array of objects. The array can contain SqlMessages, DataSet, RowCount, etc. I believe the DataGridView.DataSource requires a DataTable, but I can't be sure. What has worked for me, as a quick sample code, is:
object[] resp = proxy.method(myParam);
foreach (object o in resp)
{
if (o.GetType().ToString().Equals("System.Data.DataSet"))
{
this.dataGridView1.DataSource = ((DataSet)o).Tables[0];
}
}
If the stored procedure was mapped to the endpoint WITH the keyword "FORMAT = ROWSETS_ONLY", then the result of the stored procedure is directly a DataSet. The DataSet object can contain multiple DataTables (depending on how many SELECT statements are in the stored procedure). You can then assign the DataTable as the data source of the DataGridView. So, something like:
DataSet ds = proxy.method(myParam);
this.dataGridView1.DataSource = ds.Tables[0];
Jimmy
|||Jimmy,
sorry for my late response (vacation).
The provided solution works fine. Also the explanation of the "FORMAT" keyword was very helpful.
Thank you very much.
Best regards,
Wolfgang
Could not bind a SQL Server 2005 Web Service to DataGridView when creating Web Service Client in
Hello,
I would like to develop a minimal Web Service Client in Visual Studio (C#) which call a Web Service created in SQL Server 2005. I have definied a simple stored procedure and a HTTP endpoint which are both working.
In Visual Studio 2005 Pro I proceed following steps:
New application (C#)
Add web reference to the project (http://localhost:8084/Produktdaten?wsdl)
Add DataGridView to the form1 in the designer window
Configure DataGridView Data Source by selecting "other data sources" - "project data sources" - "localhost" and "produktdaten". In the Form1 (Designer View) the columns "EnableDecompress" ... appears. I could not select my expected web method "GetProduct" definied in the stored procedure.
Afterwards I tried to solve the problem manually with the following code (form1.cs). I could compile this windows application succesfully. When I started the corresponding.exe file I got an error. In the debugging mode problems were reported with the line "dataGridView1.DataMember = "Product";". In the SQL Server database (AdventureWorks) the product table belongs to the schema production. Also with production.product the code listed below did not work.
Could you please help to get this simple web service client running.
Best regards,
Wolfgang
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace AWProductWebServiceClient
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
localhost.Produktdaten ws = new localhost.Produktdaten();
dataGridView1.DataSource = ws.GetProduct();
dataGridView1.DataMember = "Product";
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}
Wolfgang,
In general, you can not directly assign the result from the SQL Server 2005 Native Web Services web method as the data source to a dataGridView.
BTW, you do not need to configure the DataGridView data source at design time.
If the stored procedure was mapped to the endpoint WITHOUT the keyword "FORMAT = ROWSETS_ONLY", then the result of the stored procedure is an array of objects. The array can contain SqlMessages, DataSet, RowCount, etc. I believe the DataGridView.DataSource requires a DataTable, but I can't be sure. What has worked for me, as a quick sample code, is:
object[] resp = proxy.method(myParam);
foreach (object o in resp)
{
if (o.GetType().ToString().Equals("System.Data.DataSet"))
{
this.dataGridView1.DataSource = ((DataSet)o).Tables[0];
}
}
If the stored procedure was mapped to the endpoint WITH the keyword "FORMAT = ROWSETS_ONLY", then the result of the stored procedure is directly a DataSet. The DataSet object can contain multiple DataTables (depending on how many SELECT statements are in the stored procedure). You can then assign the DataTable as the data source of the DataGridView. So, something like:
DataSet ds = proxy.method(myParam);
this.dataGridView1.DataSource = ds.Tables[0];
Jimmy
|||Jimmy,
sorry for my late response (vacation).
The provided solution works fine. Also the explanation of the "FORMAT" keyword was very helpful.
Thank you very much.
Best regards,
Wolfgang
Could not bind a SQL Server 2005 Web Service to DataGridView when creating Web Service Clien
Hello,
I would like to develop a minimal Web Service Client in Visual Studio (C#) which call a Web Service created in SQL Server 2005. I have definied a simple stored procedure and a HTTP endpoint which are both working.
In Visual Studio 2005 Pro I proceed following steps:
New application (C#)
Add web reference to the project (http://localhost:8084/Produktdaten?wsdl)
Add DataGridView to the form1 in the designer window
Configure DataGridView Data Source by selecting "other data sources" - "project data sources" - "localhost" and "produktdaten". In the Form1 (Designer View) the columns "EnableDecompress" ... appears. I could not select my expected web method "GetProduct" definied in the stored procedure.
Afterwards I tried to solve the problem manually with the following code (form1.cs). I could compile this windows application succesfully. When I started the corresponding.exe file I got an error. In the debugging mode problems were reported with the line "dataGridView1.DataMember = "Product";". In the SQL Server database (AdventureWorks) the product table belongs to the schema production. Also with production.product the code listed below did not work.
Could you please help to get this simple web service client running.
Best regards,
Wolfgang
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace AWProductWebServiceClient
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
localhost.Produktdaten ws = new localhost.Produktdaten();
dataGridView1.DataSource = ws.GetProduct();
dataGridView1.DataMember = "Product";
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}
Wolfgang,
In general, you can not directly assign the result from the SQL Server 2005 Native Web Services web method as the data source to a dataGridView.
BTW, you do not need to configure the DataGridView data source at design time.
If the stored procedure was mapped to the endpoint WITHOUT the keyword "FORMAT = ROWSETS_ONLY", then the result of the stored procedure is an array of objects. The array can contain SqlMessages, DataSet, RowCount, etc. I believe the DataGridView.DataSource requires a DataTable, but I can't be sure. What has worked for me, as a quick sample code, is:
object[] resp = proxy.method(myParam);
foreach (object o in resp)
{
if (o.GetType().ToString().Equals("System.Data.DataSet"))
{
this.dataGridView1.DataSource = ((DataSet)o).Tables[0];
}
}
If the stored procedure was mapped to the endpoint WITH the keyword "FORMAT = ROWSETS_ONLY", then the result of the stored procedure is directly a DataSet. The DataSet object can contain multiple DataTables (depending on how many SELECT statements are in the stored procedure). You can then assign the DataTable as the data source of the DataGridView. So, something like:
DataSet ds = proxy.method(myParam);
this.dataGridView1.DataSource = ds.Tables[0];
Jimmy
|||Jimmy,
sorry for my late response (vacation).
The provided solution works fine. Also the explanation of the "FORMAT" keyword was very helpful.
Thank you very much.
Best regards,
Wolfgang
Tuesday, February 14, 2012
Corrupted MSDE files encountered
(I used a support call) discovered the root cause. I hope someone finds it
helpful.
I ran into a frustrating problem when installing MSDE as a part of two
different application -- Backup Exec and WSUS. I also ran into it when I
downloaded MSDE200A and tried to install it seperately.
Setup would start, load and start to run an msi file, then report it
couldn't find that msi. This happened the same way in the Backup Exec
install, the WSUS install and the MSDE200A install.
After a fresh download the install ran fine. I thought about this, then
realized, and subsequently proved to my satisfaction, the problem only
happened when I downloaded a self-expanding exe file and used Winzip to
expand it to my setup source directories.
When I do this, MSDE setup fails when running a .msi file. If I just
double-click the exe and let it expand itself to a temp directory, the MSDE
setup runs fine. I did this with all three failed setups.
I was using Winzip 8. I don't know if it happens with other versions or not.
I don't know if the problem lies in Winzip or in the compression of MSDE
files and don't have the resouces to find out. I am copying this to WINZIP
and to the MS MSDE forum..
Axel Larson,
Share What You Know,
Learn What You Don't
Thanks for sharing this.
Frank McCallister SBS MVP
COMPUMAC
"Axel" <Axel@.office.Reliasense.com> wrote in message
news:%239mpCW2fFHA.3940@.TK2MSFTNGP14.phx.gbl...
> This is just to pass on something that caused me a lot of problems until
> we
> (I used a support call) discovered the root cause. I hope someone finds it
> helpful.
> I ran into a frustrating problem when installing MSDE as a part of two
> different application -- Backup Exec and WSUS. I also ran into it when I
> downloaded MSDE200A and tried to install it seperately.
> Setup would start, load and start to run an msi file, then report it
> couldn't find that msi. This happened the same way in the Backup Exec
> install, the WSUS install and the MSDE200A install.
> After a fresh download the install ran fine. I thought about this, then
> realized, and subsequently proved to my satisfaction, the problem only
> happened when I downloaded a self-expanding exe file and used Winzip to
> expand it to my setup source directories.
> When I do this, MSDE setup fails when running a .msi file. If I just
> double-click the exe and let it expand itself to a temp directory, the
> MSDE
> setup runs fine. I did this with all three failed setups.
> I was using Winzip 8. I don't know if it happens with other versions or
> not.
> I don't know if the problem lies in Winzip or in the compression of MSDE
> files and don't have the resouces to find out. I am copying this to WINZIP
> and to the MS MSDE forum..
> --
> Axel Larson,
> Share What You Know,
> Learn What You Don't
>