显示标签为“net”的博文。显示所有博文
显示标签为“net”的博文。显示所有博文

2012年3月27日星期二

Anyone lend a hand in .NET?

This is just one of many SQL based questions that go unanswered in the .NET forum. If anyone has some spare time, it would be great if you could take a look at the post mentioned above and also see if there are any other database questions that would benefit from your expertise!!

Thanks!It doesn't look like I can click on "This".
I check SQL questions sometimes on VB forum but don't have time for more... :(

I am working full time and try to manage some questions whenever I can...
I don't see anyone to answer questions on this forum but me for a while.

You can move some questions to SQL forum I guess.
I have some knowledge of .Net

Irina.|||http://www.msdner.com/forum/thread633912.html is what "This" is.|||I responded to the best of my abilities.

You can refer people to this article:
http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson05.aspx

Thank you.
Good Luck.|||

Quote:

Originally Posted by iburyak

I responded to the best of my abilities.

You can refer people to this article:
http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson05.aspx

Thank you.
Good Luck.


Good, hopefully this will put them in the right direction!

Thanks!sql

anyone know the best way to do this

Hi I am currently performing the following tasks manually and was wondering
if anyone might suggest if a script,dts or possibly .net application could do
this.
1. get file name from user
2. copy file from one server to another (path does not change so could be
hardcoded)
3. insert the name of the file in a database table (SQL2000).
thanks.
--
Paul G
Software engineer.More info needed here - what interface does the user have to the
application - where are they giving the file name to you? In a SQL
context or Application context?
If assumptions are kept simple.....
1. depends on the application, but shouldn't be too hard
2. USE Master
GO
EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
"\\server2\filepath\filename.xyz"'
3. USE Userdb
GO
INSERT table
select 'filename'
Maybe write a SP with a filename parameter and execute #2 & #3 with the
same SP.|||Hi thanks for the information. Sounds like you can perform a copy with the
command you provided.Think I will just use a .net application that calls a
stored procedure passing the name of the file as an input to the procedure.
will use this command as you provided.
EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
"\\server2\filepath\filename.xyz"'
--
Paul G
Software engineer.
"unc27932@.yahoo.com" wrote:
> More info needed here - what interface does the user have to the
> application - where are they giving the file name to you? In a SQL
> context or Application context?
> If assumptions are kept simple.....
> 1. depends on the application, but shouldn't be too hard
> 2. USE Master
> GO
> EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
> "\\server2\filepath\filename.xyz"'
> 3. USE Userdb
> GO
> INSERT table
> select 'filename'
> Maybe write a SP with a filename parameter and execute #2 & #3 with the
> same SP.
>|||Yes - check out BOL on xp_cmdshell. Beware though - the logged in user
(or application) will have to have the correct OS permissions on the
aforementioned directories (I believe)....Can anyone else confirm?
Also - I wouldn't give your users a chance to input a command...just
give them the ability to enter a filepath and you hardcode the
command/sp in your application. Otherwise, they could do nasty things
with xp_cmdshell, as it's an open window into the OS.|||ok thanks was thinking of hardcoding the path and then building the rest of
the string with the file name that is passed into the stored procedure. Was
also thinking of somehow testing the filename input (probably in the .net
app) and not call the stored procedure unless a valid filename is supplied.
Will most likely only be 1 user other than myself but also thinking they
would have to have permissions to the directories, source and destination.
--
Paul G
Software engineer.
"unc27932@.yahoo.com" wrote:
> Yes - check out BOL on xp_cmdshell. Beware though - the logged in user
> (or application) will have to have the correct OS permissions on the
> aforementioned directories (I believe)....Can anyone else confirm?
> Also - I wouldn't give your users a chance to input a command...just
> give them the ability to enter a filepath and you hardcode the
> command/sp in your application. Otherwise, they could do nasty things
> with xp_cmdshell, as it's an open window into the OS.
>sql

anyone know the best way to do this

Hi I am currently performing the following tasks manually and was wondering
if anyone might suggest if a script,dts or possibly .net application could d
o
this.
1. get file name from user
2. copy file from one server to another (path does not change so could be
hardcoded)
3. insert the name of the file in a database table (SQL2000).
thanks.
--
Paul G
Software engineer.More info needed here - what interface does the user have to the
application - where are they giving the file name to you? In a SQL
context or Application context?
If assumptions are kept simple.....
1. depends on the application, but shouldn't be too hard
2. USE Master
GO
EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
"\\server2\filepath\filename.xyz"'
3. USE Userdb
GO
INSERT table
select 'filename'
Maybe write a SP with a filename parameter and execute #2 & #3 with the
same SP.|||Hi thanks for the information. Sounds like you can perform a copy with the
command you provided.Think I will just use a .net application that calls a
stored procedure passing the name of the file as an input to the procedure.
will use this command as you provided.
EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
"\\server2\filepath\filename.xyz"'
Paul G
Software engineer.
"unc27932@.yahoo.com" wrote:

> More info needed here - what interface does the user have to the
> application - where are they giving the file name to you? In a SQL
> context or Application context?
> If assumptions are kept simple.....
> 1. depends on the application, but shouldn't be too hard
> 2. USE Master
> GO
> EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
> "\\server2\filepath\filename.xyz"'
> 3. USE Userdb
> GO
> INSERT table
> select 'filename'
> Maybe write a SP with a filename parameter and execute #2 & #3 with the
> same SP.
>|||Yes - check out BOL on xp_cmdshell. Beware though - the logged in user
(or application) will have to have the correct OS permissions on the
aforementioned directories (I believe)....Can anyone else confirm?
Also - I wouldn't give your users a chance to input a command...just
give them the ability to enter a filepath and you hardcode the
command/sp in your application. Otherwise, they could do nasty things
with xp_cmdshell, as it's an open window into the OS.|||ok thanks was thinking of hardcoding the path and then building the rest of
the string with the file name that is passed into the stored procedure. Was
also thinking of somehow testing the filename input (probably in the .net
app) and not call the stored procedure unless a valid filename is supplied.
Will most likely only be 1 user other than myself but also thinking they
would have to have permissions to the directories, source and destination.
--
Paul G
Software engineer.
"unc27932@.yahoo.com" wrote:

> Yes - check out BOL on xp_cmdshell. Beware though - the logged in user
> (or application) will have to have the correct OS permissions on the
> aforementioned directories (I believe)....Can anyone else confirm?
> Also - I wouldn't give your users a chance to input a command...just
> give them the ability to enter a filepath and you hardcode the
> command/sp in your application. Otherwise, they could do nasty things
> with xp_cmdshell, as it's an open window into the OS.
>

anyone know the best way to do this

Hi I am currently performing the following tasks manually and was wondering
if anyone might suggest if a script,dts or possibly .net application could do
this.
1. get file name from user
2. copy file from one server to another (path does not change so could be
hardcoded)
3. insert the name of the file in a database table (SQL2000).
thanks.
Paul G
Software engineer.
More info needed here - what interface does the user have to the
application - where are they giving the file name to you? In a SQL
context or Application context?
If assumptions are kept simple.....
1. depends on the application, but shouldn't be too hard
2. USE Master
GO
EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
"\\server2\filepath\filename.xyz"'
3. USE Userdb
GO
INSERT table
select 'filename'
Maybe write a SP with a filename parameter and execute #2 & #3 with the
same SP.
|||Hi thanks for the information. Sounds like you can perform a copy with the
command you provided.Think I will just use a .net application that calls a
stored procedure passing the name of the file as an input to the procedure.
will use this command as you provided.
EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
"\\server2\filepath\filename.xyz"'
Paul G
Software engineer.
"unc27932@.yahoo.com" wrote:

> More info needed here - what interface does the user have to the
> application - where are they giving the file name to you? In a SQL
> context or Application context?
> If assumptions are kept simple.....
> 1. depends on the application, but shouldn't be too hard
> 2. USE Master
> GO
> EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
> "\\server2\filepath\filename.xyz"'
> 3. USE Userdb
> GO
> INSERT table
> select 'filename'
> Maybe write a SP with a filename parameter and execute #2 & #3 with the
> same SP.
>
|||Yes - check out BOL on xp_cmdshell. Beware though - the logged in user
(or application) will have to have the correct OS permissions on the
aforementioned directories (I believe)....Can anyone else confirm?
Also - I wouldn't give your users a chance to input a command...just
give them the ability to enter a filepath and you hardcode the
command/sp in your application. Otherwise, they could do nasty things
with xp_cmdshell, as it's an open window into the OS.
|||ok thanks was thinking of hardcoding the path and then building the rest of
the string with the file name that is passed into the stored procedure. Was
also thinking of somehow testing the filename input (probably in the .net
app) and not call the stored procedure unless a valid filename is supplied.
Will most likely only be 1 user other than myself but also thinking they
would have to have permissions to the directories, source and destination.
Paul G
Software engineer.
"unc27932@.yahoo.com" wrote:

> Yes - check out BOL on xp_cmdshell. Beware though - the logged in user
> (or application) will have to have the correct OS permissions on the
> aforementioned directories (I believe)....Can anyone else confirm?
> Also - I wouldn't give your users a chance to input a command...just
> give them the ability to enter a filepath and you hardcode the
> command/sp in your application. Otherwise, they could do nasty things
> with xp_cmdshell, as it's an open window into the OS.
>

2012年3月25日星期日

Anyone have an answer to this?

Anyone have an answer to this?
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Anyone have an answer to what?
(Hint: if you use a threaded newsreader, instead of a web-based interface,
and keep the subject the same as it was before, you'll have better luck
tracking threads and following up.)
http://www.aspfaq.com/
(Reverse address to reply.)
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:OWNxJhmSEHA.2408@.tk2msftngp13.phx.gbl...
> Anyone have an answer to this?
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.
sql

Anyone have an answer to this?

Anyone have an answer to this?
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine sup
ports Post Alerts, Ratings, and Searching.Anyone have an answer to what?
(Hint: if you use a threaded newsreader, instead of a web-based interface,
and keep the subject the same as it was before, you'll have better luck
tracking threads and following up.)
http://www.aspfaq.com/
(Reverse address to reply.)
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:OWNxJhmSEHA.2408@.tk2msftngp13.phx.gbl...
> Anyone have an answer to this?
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.

Anyone have an answer to this?

Anyone have an answer to this?
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.Anyone have an answer to what?
(Hint: if you use a threaded newsreader, instead of a web-based interface,
and keep the subject the same as it was before, you'll have better luck
tracking threads and following up.)
--
http://www.aspfaq.com/
(Reverse address to reply.)
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:OWNxJhmSEHA.2408@.tk2msftngp13.phx.gbl...
> Anyone have an answer to this?
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.

Anyone got a chart of datatype conversions?

I'm looking for a chart that shows the VB6 > .NET > SQL 2005 datatypes.
E.g.
VB6 .NET SQL2005
integer int16 smallint
long int32 int
byte byte tinyint
But I want a whole chart with all datatypes. Anyone know of a URL with a
chart?
Do a search in google. There are several sites with VB6 and VB.NET type
comparisons.
Regarding SQL 2005 types there are no direct mapping for all the available
types. What you may have to look for is ADO.NET type comparisons. Checkout
the MSDN site for a full list of all ADO.NET type mappings.
Anith
|||I did a google search and didn't much that was helpful with SQL 2005.
That's why I opened this thread. I appreciate msdn suggestion but hopefully
someone will still have a URL they like for datatype conversions.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:%2385m9c4UGHA.1160@.TK2MSFTNGP09.phx.gbl...
> Do a search in google. There are several sites with VB6 and VB.NET type
> comparisons.
> Regarding SQL 2005 types there are no direct mapping for all the available
> types. What you may have to look for is ADO.NET type comparisons. Checkout
> the MSDN site for a full list of all ADO.NET type mappings.
> --
> Anith
>
sql

Anyone got a chart of datatype conversions?

I'm looking for a chart that shows the VB6 > .NET > SQL 2005 datatypes.
E.g.
VB6 .NET SQL2005
integer int16 smallint
long int32 int
byte byte tinyint
But I want a whole chart with all datatypes. Anyone know of a URL with a
chart?Do a search in google. There are several sites with VB6 and VB.NET type
comparisons.
Regarding SQL 2005 types there are no direct mapping for all the available
types. What you may have to look for is ADO.NET type comparisons. Checkout
the MSDN site for a full list of all ADO.NET type mappings.
Anith|||I did a google search and didn't much that was helpful with SQL 2005.
That's why I opened this thread. I appreciate msdn suggestion but hopefully
someone will still have a URL they like for datatype conversions.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:%2385m9c4UGHA.1160@.TK2MSFTNGP09.phx.gbl...
> Do a search in google. There are several sites with VB6 and VB.NET type
> comparisons.
> Regarding SQL 2005 types there are no direct mapping for all the available
> types. What you may have to look for is ADO.NET type comparisons. Checkout
> the MSDN site for a full list of all ADO.NET type mappings.
> --
> Anith
>

Anyone got a chart of datatype conversions?

I'm looking for a chart that shows the VB6 > .NET > SQL 2005 datatypes.
E.g.
VB6 .NET SQL2005
integer int16 smallint
long int32 int
byte byte tinyint
But I want a whole chart with all datatypes. Anyone know of a URL with a
chart?Do a search in google. There are several sites with VB6 and VB.NET type
comparisons.
Regarding SQL 2005 types there are no direct mapping for all the available
types. What you may have to look for is ADO.NET type comparisons. Checkout
the MSDN site for a full list of all ADO.NET type mappings.
--
Anith|||I did a google search and didn't much that was helpful with SQL 2005.
That's why I opened this thread. I appreciate msdn suggestion but hopefully
someone will still have a URL they like for datatype conversions.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:%2385m9c4UGHA.1160@.TK2MSFTNGP09.phx.gbl...
> Do a search in google. There are several sites with VB6 and VB.NET type
> comparisons.
> Regarding SQL 2005 types there are no direct mapping for all the available
> types. What you may have to look for is ADO.NET type comparisons. Checkout
> the MSDN site for a full list of all ADO.NET type mappings.
> --
> Anith
>

2012年3月22日星期四

Any way to use params in a SELECT...IN query?

I wish to execute a query like this:
SELECT name FROM Owner WHERE ownerID IN (@.ownerIDs)
Is there any way to accomplish that? I'm using ADO.NET to execute this..
Thanks,
Pablo
--
Sleep till the end, true soul and sweet!
Nothing comes to thee new or strange.
Sleep full of rest from head to feet;
Lie still, dry dust, secure of change.
-- Alfred Tennyson (1809-1892)
-- To J. S.
Pablo Montilla
www.odyssey.com.uyCheck out http://www.sommarskog.se/dynamic_sql.html#List
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Pablo Montilla" <melkor@.odyssey.com.uy> wrote in message
news:op.typkr1dkcj6shk@.chimera.odyssey.com.uy...
>I wish to execute a query like this:
> SELECT name FROM Owner WHERE ownerID IN (@.ownerIDs)
> Is there any way to accomplish that? I'm using ADO.NET to execute this..
> Thanks,
> Pablo
> --
>
> Sleep till the end, true soul and sweet!
> Nothing comes to thee new or strange.
> Sleep full of rest from head to feet;
> Lie still, dry dust, secure of change.
> -- Alfred Tennyson (1809-1892)
> -- To J. S.
> Pablo Montilla
> www.odyssey.com.uy|||Pablo,
I think Tibor meant:
Arrays and Lists in SQL Server
http://www.sommarskog.se/arrays-in-sql.html
AMB
"Pablo Montilla" wrote:
> I wish to execute a query like this:
> SELECT name FROM Owner WHERE ownerID IN (@.ownerIDs)
> Is there any way to accomplish that? I'm using ADO.NET to execute this..
> Thanks,
> Pablo
> --
>
> Sleep till the end, true soul and sweet!
> Nothing comes to thee new or strange.
> Sleep full of rest from head to feet;
> Lie still, dry dust, secure of change.
> -- Alfred Tennyson (1809-1892)
> -- To J. S.
> Pablo Montilla
> www.odyssey.com.uy
>|||On Sat, 15 Sep 2007 20:22:00 -0300, Alejandro Mesa
<AlejandroMesa@.discussions.microsoft.com> wrote:
> Pablo,
> I think Tibor meant:
> Arrays and Lists in SQL Server
> http://www.sommarskog.se/arrays-in-sql.html
> AMB
>
Many thanks for the links!
Regards,
Pablo
--
Don't vote. The government will get in.
-- Anarchist's Slogan
Pablo Montilla
www.odyssey.com.uy

2012年3月19日星期一

Any way to debug using SQL SP

Hi all,
is there any way to debug stored procedure line by line just like we are
debugging VB.Net on VS?
Thanks
Rena.
VS.NET does have a SQL Debugger in it.
From the VS.NET Help file:
==========================
In Visual Studio, you can debug a stored procedure from Server Explorer or a
source window.
To debug a stored procedure from Server Explorer
1.. Establish a connection to a database using Server Explorer. For more
information, see Server Explorer Window.
2.. Expand the <database name> node.
3.. Expand the Stored Procedures node.
4.. Right-click the stored procedure you want to debug and choose Step
Into Stored Procedure from the shortcut menu.
To debug a stored procedure in the text editor
a.. In a source window, right-click the stored procedure and choose Step
Into Stored Procedure from the shortcut menu.
For more information, see Enabling SQL Debugging on SQL 2000 Desktop
Engines.
Visual Studio also enables you to debug extended stored procedures. However,
you cannot debug SQL statements that are executed outside of a stored
procedure.
Rick Sawtell
MCT, MCSD, MCDBA
|||Rena wrote:
> Hi all,
> is there any way to debug stored procedure line by line just like
> we are debugging VB.Net on VS?
> Thanks
> Rena.
You can debug right from Query Analyzer.
David G.
|||Query Analyzer --> Object Browser --> Right click the SP -
-> Debug
regds,
Shrikant Patil
MCDBA

>--Original Message--
>Hi all,
> is there any way to debug stored procedure line by
line just like we are
>debugging VB.Net on VS?
>Thanks
>Rena.
>
>.
>
|||Thx all for the helps~~~
"Rick Sawtell" <ricksawtell@.hotmail.com> wrote in message
news:OR$tKoDkEHA.1800@.TK2MSFTNGP15.phx.gbl...
> VS.NET does have a SQL Debugger in it.
> From the VS.NET Help file:
> ==========================
> In Visual Studio, you can debug a stored procedure from Server Explorer or
a
> source window.
> To debug a stored procedure from Server Explorer
> 1.. Establish a connection to a database using Server Explorer. For more
> information, see Server Explorer Window.
> 2.. Expand the <database name> node.
> 3.. Expand the Stored Procedures node.
> 4.. Right-click the stored procedure you want to debug and choose Step
> Into Stored Procedure from the shortcut menu.
> To debug a stored procedure in the text editor
> a.. In a source window, right-click the stored procedure and choose Step
> Into Stored Procedure from the shortcut menu.
> For more information, see Enabling SQL Debugging on SQL 2000 Desktop
> Engines.
> Visual Studio also enables you to debug extended stored procedures.
However,
> you cannot debug SQL statements that are executed outside of a stored
> procedure.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
|||Can you set a Break Point and only stop at that point, rather than
continually stepping?
If you are trying to trap a bug in the procedure, it is very useful to have
a breakpoint.
We can set one, but it never stops there, except when we are stepping
through line by line.
Cheers
Harry
"Rick Sawtell" wrote:

> VS.NET does have a SQL Debugger in it.
> From the VS.NET Help file:
> ==========================
> In Visual Studio, you can debug a stored procedure from Server Explorer or a
> source window.
> To debug a stored procedure from Server Explorer
> 1.. Establish a connection to a database using Server Explorer. For more
> information, see Server Explorer Window.
> 2.. Expand the <database name> node.
> 3.. Expand the Stored Procedures node.
> 4.. Right-click the stored procedure you want to debug and choose Step
> Into Stored Procedure from the shortcut menu.
> To debug a stored procedure in the text editor
> a.. In a source window, right-click the stored procedure and choose Step
> Into Stored Procedure from the shortcut menu.
> For more information, see Enabling SQL Debugging on SQL 2000 Desktop
> Engines.
> Visual Studio also enables you to debug extended stored procedures. However,
> you cannot debug SQL statements that are executed outside of a stored
> procedure.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
|||"Shrikant Patil" wrote:

> Query Analyzer --> Object Browser --> Right click the SP -
> -> Debug
>
> regds,
> Shrikant Patil
> MCDBA
>
> line just like we are
>
|||> "Shrikant Patil" wrote:
> Query Analyzer --> Object Browser --> Right click the SP -
> -> Debug
Hi,
I am a newbie to QA debugger. I noticed that this debugger can only be used
with stored procedures. I have created a following stored proc which in turn
calles an user defined function. Basically my intention is to debug the user
defined function.
create proc dbo.rp_test
(@.ordinal smallint)
AS
BEGIN
SELECT * FROM dbo.MyUserDefFunction( 'Carbon')
END
GO
Eventhough I could place break point at the select * statement, the
execution never stops at the break point.
Can anyone tell me what am I missing here? Or is there anyother better way
to debug MyUserDefFunction()?
Thanks for any help,
Kosu

Any way to debug using SQL SP

Hi all,
is there any way to debug stored procedure line by line just like we are
debugging VB.Net on VS'
Thanks
Rena.VS.NET does have a SQL Debugger in it.
From the VS.NET Help file:
==========================
In Visual Studio, you can debug a stored procedure from Server Explorer or a
source window.
To debug a stored procedure from Server Explorer
1.. Establish a connection to a database using Server Explorer. For more
information, see Server Explorer Window.
2.. Expand the <database name> node.
3.. Expand the Stored Procedures node.
4.. Right-click the stored procedure you want to debug and choose Step
Into Stored Procedure from the shortcut menu.
To debug a stored procedure in the text editor
a.. In a source window, right-click the stored procedure and choose Step
Into Stored Procedure from the shortcut menu.
For more information, see Enabling SQL Debugging on SQL 2000 Desktop
Engines.
Visual Studio also enables you to debug extended stored procedures. However,
you cannot debug SQL statements that are executed outside of a stored
procedure.
Rick Sawtell
MCT, MCSD, MCDBA|||Rena wrote:
> Hi all,
> is there any way to debug stored procedure line by line just like
> we are debugging VB.Net on VS'
> Thanks
> Rena.
You can debug right from Query Analyzer.
David G.|||Query Analyzer --> Object Browser --> Right click the SP -
-> Debug
regds,
Shrikant Patil
MCDBA

>--Original Message--
>Hi all,
> is there any way to debug stored procedure line by
line just like we are
>debugging VB.Net on VS'
>Thanks
>Rena.
>
>.
>|||Thx all for the helps~~~
"Rick Sawtell" <ricksawtell@.hotmail.com> wrote in message
news:OR$tKoDkEHA.1800@.TK2MSFTNGP15.phx.gbl...
> VS.NET does have a SQL Debugger in it.
> From the VS.NET Help file:
> ==========================
> In Visual Studio, you can debug a stored procedure from Server Explorer or
a
> source window.
> To debug a stored procedure from Server Explorer
> 1.. Establish a connection to a database using Server Explorer. For more
> information, see Server Explorer Window.
> 2.. Expand the <database name> node.
> 3.. Expand the Stored Procedures node.
> 4.. Right-click the stored procedure you want to debug and choose Step
> Into Stored Procedure from the shortcut menu.
> To debug a stored procedure in the text editor
> a.. In a source window, right-click the stored procedure and choose Step
> Into Stored Procedure from the shortcut menu.
> For more information, see Enabling SQL Debugging on SQL 2000 Desktop
> Engines.
> Visual Studio also enables you to debug extended stored procedures.
However,
> you cannot debug SQL statements that are executed outside of a stored
> procedure.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||Can you set a Break Point and only stop at that point, rather than
continually stepping?
If you are trying to trap a bug in the procedure, it is very useful to have
a breakpoint.
We can set one, but it never stops there, except when we are stepping
through line by line.
Cheers
Harry
"Rick Sawtell" wrote:

> VS.NET does have a SQL Debugger in it.
> From the VS.NET Help file:
> ==========================
> In Visual Studio, you can debug a stored procedure from Server Explorer or
a
> source window.
> To debug a stored procedure from Server Explorer
> 1.. Establish a connection to a database using Server Explorer. For more
> information, see Server Explorer Window.
> 2.. Expand the <database name> node.
> 3.. Expand the Stored Procedures node.
> 4.. Right-click the stored procedure you want to debug and choose Step
> Into Stored Procedure from the shortcut menu.
> To debug a stored procedure in the text editor
> a.. In a source window, right-click the stored procedure and choose Step
> Into Stored Procedure from the shortcut menu.
> For more information, see Enabling SQL Debugging on SQL 2000 Desktop
> Engines.
> Visual Studio also enables you to debug extended stored procedures. Howeve
r,
> you cannot debug SQL statements that are executed outside of a stored
> procedure.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||"Shrikant Patil" wrote:

> Query Analyzer --> Object Browser --> Right click the SP -
> -> Debug
>
> regds,
> Shrikant Patil
> MCDBA
>
> line just like we are
>|||> "Shrikant Patil" wrote:
> Query Analyzer --> Object Browser --> Right click the SP -
> -> Debug
Hi,
I am a newbie to QA debugger. I noticed that this debugger can only be used
with stored procedures. I have created a following stored proc which in turn
calles an user defined function. Basically my intention is to debug the user
defined function.
create proc dbo.rp_test
(@.ordinal smallint)
AS
BEGIN
SELECT * FROM dbo.MyUserDefFunction( 'Carbon')
END
GO
Eventhough I could place break point at the select * statement, the
execution never stops at the break point.
Can anyone tell me what am I missing here? Or is there anyother better way
to debug MyUserDefFunction()?
Thanks for any help,
Kosu

Any way to debug using SQL SP

Hi all,
is there any way to debug stored procedure line by line just like we are
debugging VB.Net on VS'
Thanks
Rena.VS.NET does have a SQL Debugger in it.
From the VS.NET Help file:
==========================In Visual Studio, you can debug a stored procedure from Server Explorer or a
source window.
To debug a stored procedure from Server Explorer
1.. Establish a connection to a database using Server Explorer. For more
information, see Server Explorer Window.
2.. Expand the <database name> node.
3.. Expand the Stored Procedures node.
4.. Right-click the stored procedure you want to debug and choose Step
Into Stored Procedure from the shortcut menu.
To debug a stored procedure in the text editor
a.. In a source window, right-click the stored procedure and choose Step
Into Stored Procedure from the shortcut menu.
For more information, see Enabling SQL Debugging on SQL 2000 Desktop
Engines.
Visual Studio also enables you to debug extended stored procedures. However,
you cannot debug SQL statements that are executed outside of a stored
procedure.
Rick Sawtell
MCT, MCSD, MCDBA|||Rena wrote:
> Hi all,
> is there any way to debug stored procedure line by line just like
> we are debugging VB.Net on VS'
> Thanks
> Rena.
You can debug right from Query Analyzer.
--
David G.|||Query Analyzer --> Object Browser --> Right click the SP -
-> Debug
regds,
Shrikant Patil
MCDBA
>--Original Message--
>Hi all,
> is there any way to debug stored procedure line by
line just like we are
>debugging VB.Net on VS'
>Thanks
>Rena.
>
>.
>|||Thx all for the helps~~~ :)
"Rick Sawtell" <ricksawtell@.hotmail.com> wrote in message
news:OR$tKoDkEHA.1800@.TK2MSFTNGP15.phx.gbl...
> VS.NET does have a SQL Debugger in it.
> From the VS.NET Help file:
> ==========================> In Visual Studio, you can debug a stored procedure from Server Explorer or
a
> source window.
> To debug a stored procedure from Server Explorer
> 1.. Establish a connection to a database using Server Explorer. For more
> information, see Server Explorer Window.
> 2.. Expand the <database name> node.
> 3.. Expand the Stored Procedures node.
> 4.. Right-click the stored procedure you want to debug and choose Step
> Into Stored Procedure from the shortcut menu.
> To debug a stored procedure in the text editor
> a.. In a source window, right-click the stored procedure and choose Step
> Into Stored Procedure from the shortcut menu.
> For more information, see Enabling SQL Debugging on SQL 2000 Desktop
> Engines.
> Visual Studio also enables you to debug extended stored procedures.
However,
> you cannot debug SQL statements that are executed outside of a stored
> procedure.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||Can you set a Break Point and only stop at that point, rather than
continually stepping?
If you are trying to trap a bug in the procedure, it is very useful to have
a breakpoint.
We can set one, but it never stops there, except when we are stepping
through line by line.
Cheers
Harry
"Rick Sawtell" wrote:
> VS.NET does have a SQL Debugger in it.
> From the VS.NET Help file:
> ==========================> In Visual Studio, you can debug a stored procedure from Server Explorer or a
> source window.
> To debug a stored procedure from Server Explorer
> 1.. Establish a connection to a database using Server Explorer. For more
> information, see Server Explorer Window.
> 2.. Expand the <database name> node.
> 3.. Expand the Stored Procedures node.
> 4.. Right-click the stored procedure you want to debug and choose Step
> Into Stored Procedure from the shortcut menu.
> To debug a stored procedure in the text editor
> a.. In a source window, right-click the stored procedure and choose Step
> Into Stored Procedure from the shortcut menu.
> For more information, see Enabling SQL Debugging on SQL 2000 Desktop
> Engines.
> Visual Studio also enables you to debug extended stored procedures. However,
> you cannot debug SQL statements that are executed outside of a stored
> procedure.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||"Shrikant Patil" wrote:
> Query Analyzer --> Object Browser --> Right click the SP -
> -> Debug
>
> regds,
> Shrikant Patil
> MCDBA
>
> >--Original Message--
> >Hi all,
> > is there any way to debug stored procedure line by
> line just like we are
> >debugging VB.Net on VS'
> >
> >Thanks
> >Rena.
> >
> >
> >.
> >
>|||> "Shrikant Patil" wrote:
> Query Analyzer --> Object Browser --> Right click the SP -
> -> Debug
Hi,
I am a newbie to QA debugger. I noticed that this debugger can only be used
with stored procedures. I have created a following stored proc which in turn
calles an user defined function. Basically my intention is to debug the user
defined function.
create proc dbo.rp_test
(@.ordinal smallint)
AS
BEGIN
SELECT * FROM dbo.MyUserDefFunction( 'Carbon')
END
GO
Eventhough I could place break point at the select * statement, the
execution never stops at the break point.
Can anyone tell me what am I missing here? Or is there anyother better way
to debug MyUserDefFunction()?
Thanks for any help,
Kosu

2012年3月8日星期四

Any sample banking database to download?

I am a .net developer, know how to get my data from the database
through SQL. I am getting interested in database design, and am
wondering if there are any sample banking database to download.
Basically, for practice, I would like to design a credit card
company's database, such that users can check their charge history,
payment history, current balance, current balance due, etc., pretty
much functionalities which most credit card services provide online.
Any suggestion about how to get started?
Thank you very much."gnewsgroup" wrote:
> I am a .net developer, know how to get my data from the database
> through SQL. I am getting interested in database design, and am
> wondering if there are any sample banking database to download.
> Basically, for practice, I would like to design a credit card
> company's database, such that users can check their charge history,
> payment history, current balance, current balance due, etc., pretty
> much functionalities which most credit card services provide online.
> Any suggestion about how to get started?
> Thank you very much.
>
Hi
Although not a complete schema
http://www.microsoft.com/sql/editions/express/starterschemas.mspx may give
you parts such as customer management etc. The transaction history is a very
similar situation to a invoice item/detail where each item is a card
transaction.
John|||On Apr 28, 8:10 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> "gnewsgroup" wrote:
> > I am a .net developer, know how to get my data from the database
> > through SQL. I am getting interested in database design, and am
> > wondering if there are any sample banking database to download.
> > Basically, for practice, I would like to design a credit card
> > company's database, such that users can check their charge history,
> > payment history, current balance, current balance due, etc., pretty
> > much functionalities which most credit card services provide online.
> > Any suggestion about how to get started?
> > Thank you very much.
> Hi
> Although not a complete schemahttp://www.microsoft.com/sql/editions/express/starterschemas.mspxmay give
> you parts such as customer management etc. The transaction history is a very
> similar situation to a invoice item/detail where each item is a card
> transaction.
> John
Very cool. Thank you very much. I will closely study a few of them
and may get an idea.|||On Apr 28, 8:10 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> "gnewsgroup" wrote:
> > I am a .net developer, know how to get my data from the database
> > through SQL. I am getting interested in database design, and am
> > wondering if there are any sample banking database to download.
> > Basically, for practice, I would like to design a credit card
> > company's database, such that users can check their charge history,
> > payment history, current balance, current balance due, etc., pretty
> > much functionalities which most credit card services provide online.
> > Any suggestion about how to get started?
> > Thank you very much.
> Hi
> Although not a complete schemahttp://www.microsoft.com/sql/editions/express/starterschemas.mspxmay give
> you parts such as customer management etc. The transaction history is a very
> similar situation to a invoice item/detail where each item is a card
> transaction.
> John
Thank you. I downloaded those databases, unzipped. But because they
don't come with the log file (*.ldf), I cannot attach them, and
therefore, cannot use it.
I googled, and found this:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=85187
I followed the method provided over there by BashTheGeek, but could
not succeed. I am using SQL Server 2005 Express and got an error
which says something like I cannot ad hoc change the status of a
database.
I don't know why M$ could not have included the LDF file and make our
newbies' life easier. It's called starter database, right?
Any hint is highly appreciated.|||On Apr 29, 9:53 am, gnewsgroup <gnewsgr...@.gmail.com> wrote:
> On Apr 28, 8:10 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
>
> > "gnewsgroup" wrote:
> > > I am a .net developer, know how to get my data from the database
> > > through SQL. I am getting interested in database design, and am
> > > wondering if there are any sample banking database to download.
> > > Basically, for practice, I would like to design a credit card
> > > company's database, such that users can check their charge history,
> > > payment history, current balance, current balance due, etc., pretty
> > > much functionalities which most credit card services provide online.
> > > Any suggestion about how to get started?
> > > Thank you very much.
> > Hi
> > Although not a complete schemahttp://www.microsoft.com/sql/editions/express/starterschemas.mspxmaygive
> > you parts such as customer management etc. The transaction history is a very
> > similar situation to a invoice item/detail where each item is a card
> > transaction.
> > John
> Thank you. I downloaded those databases, unzipped. But because they
> don't come with the log file (*.ldf), I cannot attach them, and
> therefore, cannot use it.
> I googled, and found this:
> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=85187
> I followed the method provided over there by BashTheGeek, but could
> not succeed. I am using SQL Server 2005 Express and got an error
> which says something like I cannot ad hoc change the status of a
> database.
> I don't know why M$ could not have included the LDF file and make our
> newbies' life easier. It's called starter database, right?
> Any hint is highly appreciated.
Never mind, at an MSDN forum, one guy says that we when attach the
database, simply remove the log file in the dialog box, and attach
it. When it is attached the database will create a log file. That
was easy.|||On Apr 29, 9:53 am, gnewsgroup <gnewsgr...@.gmail.com> wrote:
> On Apr 28, 8:10 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
>
> > "gnewsgroup" wrote:
> > > I am a .net developer, know how to get my data from the database
> > > through SQL. I am getting interested in database design, and am
> > > wondering if there are any sample banking database to download.
> > > Basically, for practice, I would like to design a credit card
> > > company's database, such that users can check their charge history,
> > > payment history, current balance, current balance due, etc., pretty
> > > much functionalities which most credit card services provide online.
> > > Any suggestion about how to get started?
> > > Thank you very much.
> > Hi
> > Although not a complete schemahttp://www.microsoft.com/sql/editions/express/starterschemas.mspxmaygive
> > you parts such as customer management etc. The transaction history is a very
> > similar situation to a invoice item/detail where each item is a card
> > transaction.
> > John
> Thank you. I downloaded those databases, unzipped. But because they
> don't come with the log file (*.ldf), I cannot attach them, and
> therefore, cannot use it.
> I googled, and found this:
> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=85187
> I followed the method provided over there by BashTheGeek, but could
> not succeed. I am using SQL Server 2005 Express and got an error
> which says something like I cannot ad hoc change the status of a
> database.
> I don't know why M$ could not have included the LDF file and make our
> newbies' life easier. It's called starter database, right?
> Any hint is highly appreciated.
Never mind, I found at an MSDN forum where one guy says that when we
try to attach the mdf database file, simply remove the log file from
the dialog box and when it is attached, the database will create a log
file for it. That was easy.|||> I followed the method provided over there by BashTheGeek, but could
> not succeed. I am using SQL Server 2005 Express and got an error
> which says something like I cannot ad hoc change the status of a
> database.
The poster should have been more clear about the scenario in which to use
the sp_configure "allow updates" syntax. This option is not needed at all
when the database has been detached or otherwise cleanly shut down. In fact,
the ability to modify the system catalog, which is what that syntax allows,
is not even allowed in SQL Server 2005, That's why you're getting the error
that you are.
Use either sp_attach_single_file (see
http://msdn2.microsoft.com/en-us/library/ms174385.aspx for an example)
or the following syntax introduced in SQL Server 2005:
CREATE DATABASE <db_name>
ON (FILENAME = '<dir path><file_name.mdf'>')
FOR ATTACH
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
"gnewsgroup" <gnewsgroup@.gmail.com> wrote in message
news:c761f2e5-ec29-425a-8a39-7c6395e4d79d@.b64g2000hsa.googlegroups.com...
> On Apr 28, 8:10 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
>> "gnewsgroup" wrote:
>> > I am a .net developer, know how to get my data from the database
>> > through SQL. I am getting interested in database design, and am
>> > wondering if there are any sample banking database to download.
>> > Basically, for practice, I would like to design a credit card
>> > company's database, such that users can check their charge history,
>> > payment history, current balance, current balance due, etc., pretty
>> > much functionalities which most credit card services provide online.
>> > Any suggestion about how to get started?
>> > Thank you very much.
>> Hi
>> Although not a complete
>> schemahttp://www.microsoft.com/sql/editions/express/starterschemas.mspxmay
>> give
>> you parts such as customer management etc. The transaction history is a
>> very
>> similar situation to a invoice item/detail where each item is a card
>> transaction.
>> John
> Thank you. I downloaded those databases, unzipped. But because they
> don't come with the log file (*.ldf), I cannot attach them, and
> therefore, cannot use it.
> I googled, and found this:
> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=85187
> I followed the method provided over there by BashTheGeek, but could
> not succeed. I am using SQL Server 2005 Express and got an error
> which says something like I cannot ad hoc change the status of a
> database.
> I don't know why M$ could not have included the LDF file and make our
> newbies' life easier. It's called starter database, right?
> Any hint is highly appreciated.|||On Apr 29, 1:01 pm, "Gail Erickson [MS]" <ga...@.online.microsoft.com>
wrote:
> > I followed the method provided over there by BashTheGeek, but could
> > not succeed. I am using SQL Server 2005 Express and got an error
> > which says something like I cannot ad hoc change the status of a
> > database.
> The poster should have been more clear about the scenario in which to use
> the sp_configure "allow updates" syntax. This option is not needed at all
> when the database has been detached or otherwise cleanly shut down. In fact,
> the ability to modify the system catalog, which is what that syntax allows,
> is not even allowed in SQL Server 2005, That's why you're getting the error
> that you are.
> Use either sp_attach_single_file (seehttp://msdn2.microsoft.com/en-us/library/ms174385.aspxfor an example)
> or the following syntax introduced in SQL Server 2005:
> CREATE DATABASE <db_name>
> ON (FILENAME = '<dir path><file_name.mdf'>')
> FOR ATTACH
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online fromhttp://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
>
OK, that's great. But in the MSDN forum, 2 people were saying how
helpful the answer provided by BashTheGeek was. So that sorta misled
me. :)
So,
CREATE DATABASE <db_name>
ON (FILENAME = '<dir path><file_name.mdf'>')
FOR ATTACH
will take care of the whole thing even without an LDF file?
Let me try it out. But, simply try attaching it after removing the ldf
file is easy, too.|||OK, that's great. But in the MSDN forum, 2 people were saying how
helpful the answer provided by BashTheGeek was. So that sorta misled
me. :)
Yes, you were mislead because the context of their particular scenario (i.e.
the database they were trying to attach had not been cleanly shut down) was
not made clear in the post.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
"gnewsgroup" <gnewsgroup@.gmail.com> wrote in message
news:8ee8eec9-4061-43b5-a237-79cfe0ae217e@.34g2000hsh.googlegroups.com...
> On Apr 29, 1:01 pm, "Gail Erickson [MS]" <ga...@.online.microsoft.com>
> wrote:
>> > I followed the method provided over there by BashTheGeek, but could
>> > not succeed. I am using SQL Server 2005 Express and got an error
>> > which says something like I cannot ad hoc change the status of a
>> > database.
>> The poster should have been more clear about the scenario in which to use
>> the sp_configure "allow updates" syntax. This option is not needed at all
>> when the database has been detached or otherwise cleanly shut down. In
>> fact,
>> the ability to modify the system catalog, which is what that syntax
>> allows,
>> is not even allowed in SQL Server 2005, That's why you're getting the
>> error
>> that you are.
>> Use either sp_attach_single_file
>> (seehttp://msdn2.microsoft.com/en-us/library/ms174385.aspxfor an example)
>> or the following syntax introduced in SQL Server 2005:
>> CREATE DATABASE <db_name>
>> ON (FILENAME = '<dir path><file_name.mdf'>')
>> FOR ATTACH
>> --
>> Gail Erickson [MS]
>> SQL Server Documentation Team
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights
>> Download the latest version of Books Online
>> fromhttp://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
> OK, that's great. But in the MSDN forum, 2 people were saying how
> helpful the answer provided by BashTheGeek was. So that sorta misled
> me. :)
> So,
> CREATE DATABASE <db_name>
> ON (FILENAME = '<dir path><file_name.mdf'>')
> FOR ATTACH
> will take care of the whole thing even without an LDF file?
> Let me try it out. But, simply try attaching it after removing the ldf
> file is easy, too.
>

Any report runs once and then I have to log back in to my app

We have an asp.net app that calls the report server for our reports. We are
running into an issue we don't even understand why it's happening let alone
fixing it...
You can only run one report and then you have to logout of the app and log
back in to run another report. This is with any of our reports! They all
work but only the first report runs the first time. After that all of the
reports don't work. Logout and log back in and choose another report and it
works...?
Here's our code that is basically the same for every report...
dstDataSet = New DataSet
Dim strSPName As String = "spSRS_Appeal_TaxAgents"
'Passing the parameter to the SQL stored procedure
Dim aryParams(1) As SqlParameter
aryParams(0) = New SqlClient.SqlParameter("@.TaxYear", SqlDbType.Int)
aryParams(0).Value = CType(strTaxYear, Integer)
aryParams(1) = New SqlClient.SqlParameter("@.Cycle", SqlDbType.Int)
aryParams(1).Value = CType(strCycle, Integer)
Try
dstDataSet = SqlHelper.ExecuteDataset(cnnConn, strSPName,
aryParams)
Dim intCount As Integer = dstDataSet.Tables(0).Rows.Count
If intCount < 1 Then
lblInfo.Text = "Report records not found! Canceled operation."
Exit Sub
End If
Catch exn As Exception
lblInfo.Text = "Error. Failed to retrieve records! " & exn.Message
End Try
'Create the URL string to render this report from the SQL report
server
'SPParam is the parameter which is submitted to the SQL sotred
procedures
Dim str1, str2, str3, str4, strURL As String
str1 = "http://tennessee/reportserver?/astransc/AppealTaxAgents"
str2 = "&rs:Command=Render&rs:Format=PDF"
str3 = strTaxYear
str4 = strCycle
Dim strPath As New System.Text.StringBuilder
strPath.Append(str1)
strPath.Append(str2)
strPath.Append("&TaxYear=").Append(str3)
strPath.Append("&Cycle=").Append(str4)
strURL = strPath.ToString
Response.Redirect(strURL)
The report is in PDF format and when the report runs it pops up a form
asking if we want to open, save, or cancel the PDF file...
The programmer who wrote this doesn't have this issue on his machine.
However, on the test server this is occuring to us. In fact the programmer
asked for assistance because on his machine it on a rare occasion would not
create the PDF file but he couldn't find a cause for it. On our test server
it occurs like clock work. Log in, run one report (any of them) and then no
other report including the one you just called won't work until you log back
in....
In looking at the report server logs the subsequent requests are not even
making it to the report server? Any ideas? We were wondering if there was
something about the response.redirect? I can take the string created by
the code type it into a url address and it works every time?
Thanks,
KevinI have somewhat figured out what is occuring...
The viewstate is being clobbered when this is occuring (not entirely sure
how but suspect it is occuring because the redirect does not physically
change the page I am on, only creates a do you want to open, save, cancel
this PDF file dialog box). I can only assume that the response.redirect is
the cause now. I am going to figure out a way to accomplish this task.
Kevin
"Kevin" wrote:
> We have an asp.net app that calls the report server for our reports. We are
> running into an issue we don't even understand why it's happening let alone
> fixing it...
> You can only run one report and then you have to logout of the app and log
> back in to run another report. This is with any of our reports! They all
> work but only the first report runs the first time. After that all of the
> reports don't work. Logout and log back in and choose another report and it
> works...?
> Here's our code that is basically the same for every report...
> dstDataSet = New DataSet
> Dim strSPName As String = "spSRS_Appeal_TaxAgents"
> 'Passing the parameter to the SQL stored procedure
> Dim aryParams(1) As SqlParameter
> aryParams(0) = New SqlClient.SqlParameter("@.TaxYear", SqlDbType.Int)
> aryParams(0).Value = CType(strTaxYear, Integer)
> aryParams(1) = New SqlClient.SqlParameter("@.Cycle", SqlDbType.Int)
> aryParams(1).Value = CType(strCycle, Integer)
> Try
> dstDataSet = SqlHelper.ExecuteDataset(cnnConn, strSPName,
> aryParams)
> Dim intCount As Integer = dstDataSet.Tables(0).Rows.Count
> If intCount < 1 Then
> lblInfo.Text = "Report records not found! Canceled operation."
> Exit Sub
> End If
> Catch exn As Exception
> lblInfo.Text = "Error. Failed to retrieve records! " & exn.Message
> End Try
> 'Create the URL string to render this report from the SQL report
> server
> 'SPParam is the parameter which is submitted to the SQL sotred
> procedures
> Dim str1, str2, str3, str4, strURL As String
> str1 = "http://tennessee/reportserver?/astransc/AppealTaxAgents"
> str2 = "&rs:Command=Render&rs:Format=PDF"
> str3 = strTaxYear
> str4 = strCycle
> Dim strPath As New System.Text.StringBuilder
> strPath.Append(str1)
> strPath.Append(str2)
> strPath.Append("&TaxYear=").Append(str3)
> strPath.Append("&Cycle=").Append(str4)
> strURL = strPath.ToString
> Response.Redirect(strURL)
> The report is in PDF format and when the report runs it pops up a form
> asking if we want to open, save, or cancel the PDF file...
> The programmer who wrote this doesn't have this issue on his machine.
> However, on the test server this is occuring to us. In fact the programmer
> asked for assistance because on his machine it on a rare occasion would not
> create the PDF file but he couldn't find a cause for it. On our test server
> it occurs like clock work. Log in, run one report (any of them) and then no
> other report including the one you just called won't work until you log back
> in....
> In looking at the report server logs the subsequent requests are not even
> making it to the report server? Any ideas? We were wondering if there was
> something about the response.redirect? I can take the string created by
> the code type it into a url address and it works every time?
> Thanks,
> Kevin

2012年2月18日星期六

any HTML DB like tool on SQL Server/.NET?

Just wondering if there are any tools out like Oracle's HTML DB for
configuring quick apps for MS SQL Server/.NET platform.
I have not use Oracle's tool (and I don't know what it does) but perhaps you
could look into SQL Server Web Data Administrator
http://www.microsoft.com/downloads/d...displaylang=en
Perhaps this will have the functionality that you desire.
Keith
"Peter Yao" <nospam@.nospam.com> wrote in message
news:OsNrunPQFHA.3288@.TK2MSFTNGP14.phx.gbl...
> Just wondering if there are any tools out like Oracle's HTML DB for
> configuring quick apps for MS SQL Server/.NET platform.
>

Any Help please!

Hi there
I am new to asp.net so I am not sure what I am doing wrong??
I have installed Visual Studio 2003, and the .net framework, we currently use sql server 2000
I have created a report in visual studion with raw SQL and I want to deploy it to my local host, however I get the message "no report server was found at (my server)"
I also tried to install reporting services but when I do I get the message "asp.net not registered with web server"
I know I am proberly missing something simple but I just cant locate it
Any help appreciated
Thanks
TimHi

catalystcommercial

You can't install SQL Reporting Services on a non server OS. You can only install a client version on XP to allow you to create SRS reports and preview them. When you build your SRS projects in VS 2003 it tries to deploy the report to your actual reportserver(server OS box). In your case you didn't specify a location. Do this : In VS2003. Click on Project >> Properties >> Configuration Properties >> Delpoyment. Fill in the "TargetServerURL" something likehttp:\\<server>\reportserver and add a TargetFolder to deploy the report to. Just click OK and build the Solution it will deploy the report to your SQL Reporting Server box.

, Hope this helps

l0n3i200n

|||

Hi

Thanks for the reply, I tried what you said and I still get the message "no report server was found at....."

PS: I am running this on our local server with server 2000

Regards

Tim

|||

There is a necessary sequence of events to follow:

Let me try to understand what you have posted -

Windows 2000 or 2003 was installed as the OS -

After installation did you go to MANAGE YOUR Server and indicate that within MANAGE YOUR SERVER ROLES the following:

Application Server indicate to configure Front Page Extensions and ASP.Net

After that you installed SQL 2000

Installed the service packs especially SP3a

Downloaded RSEVAL (Reporting Services)

Installed with SP1 and SP2

After reporting services was installed - go to IIS and select properties of Report Server and make sure anonymous access is disabled.

From your browserHTTP://localhost/reports

If you cannot get to the above http - then there are a bunch of minor issues - post back!

If you can get to above URL

edit administrator and ensure they can dio everything for the time being

Within your RS project point to your server and also to your database within the project properties and also ensure this is the dame within your data sources (shared) or spperate.

Data Source=YOUR SERVER NAME;Initial Catalog=YOUR DATA BASE NAME

Post back so we can help!

|||I read this post again - Run RSGEGISTER -- Done deal --|||

I am having the same problem. My SQL Server is on my machine. But the Report Server is on a server that I have to access, not on my machine. I keep getting the error:


An error has occurred during report processing. (rsProcessingAborted)Get Online HelpCannot create a connection to data source 'SANDO'. (rsErrorOpeningConnection)Get Online HelpAn OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.

2012年2月16日星期四

Any easy Class method to update about 100 fields of a database using stored procedure?

Hi all,

I am using C# for ASP.NEt 2003.

I would like to know if there is any easy method to update a database with about 100 fields in it.

At present, I pass all the values of the controls on the web form to the stored procedure as parameters like :-

myCommand.Parameters.Add("@.CustomerID", SqlDbType.Int).Value = txtCustomerID.text

Like this, I add all 100 parameters.

Is there any easy method to do it using a class or any other methods?

Thanking you in advance,

Tomy

I my opinion not, this is why Microsoft developed LINQ in C# 3.0.

To be able to create objects that can be passed as parameters.

|||

I assume that you have win form. It is possible to have a table in your application which will have field for each input data field on your form, you can bound your form controls to data so they will be automatically updated. Next you can use data adapter with insert and/or update statements(it can be your stored procedure) defined to run with parameters based on your table. I do not know if it will work for you but it is probably the only solution where you do not have to pass all your values to parameters of stored procedure.

Thanks

Any documentation anywhere on vs.net 2005 + report services

Well, it finally arrived, my eval version of vs.net 2005...I was so
excited, I think I really must 'get a life'...
Anyway, I recall on here mention that in vs.net 2005 you get more
control over the parameter area....can anyone point me to any
documentation on how vs.net allows more control of reports than 2003?
Did anyone write something about it somewhere?
Thanks
Peter Nolan
www.peternolan.comYou are saying vs.net 2005. vs.net is not Reporting Service. VS 2005 comes
with 2 controls. A winform control and a webform control. If you have your
own application that is integrating with RS then these controls are great.
The controls work in local mode (render without a server) and server mode.
In server mode the server must be running RS 2005, it does not work with RS
2000.
It sounds like you are using Report Manager for your portal to the reports
(versus creating your own app that interacts with the user). If so, then VS
2005 does not provide anything of use to you. You need to upgrade to RS 2005
to see any improvement. As far as more control over the parameter area. RS
2005 has a calendar date picker and it support multi-selection parameters.
Two major improvements.
RS 2005 is faster and also has support for end user sorting.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Peter Nolan" <peter@.peternolan.com> wrote in message
news:1141230819.293974.223770@.u72g2000cwu.googlegroups.com...
> Well, it finally arrived, my eval version of vs.net 2005...I was so
> excited, I think I really must 'get a life'...
> Anyway, I recall on here mention that in vs.net 2005 you get more
> control over the parameter area....can anyone point me to any
> documentation on how vs.net allows more control of reports than 2003?
> Did anyone write something about it somewhere?
> Thanks
> Peter Nolan
> www.peternolan.com
>|||Hi Bruce,
yes, I mean vs.net 2005...I also have sql server 2005.....I have been
going through the 'upgrade' process from sql server 2000 + RS and
vs.net 2003. We are playing around with all the 2005 stuff and
integrating dundas chart controls.
We are building a product based on all the MSFT technology stack (music
to your eyes I am sure)...and we are trying to make it the very best we
can on all 2005 stuff.
We want to integrate it into dotnetnuke in the future but it looks like
it is a bit of work to do and we decided for version 1.0 we would go
with the out of the box report manager.
So currently, we want the 'best result' we can get with vs.net 2005 and
sql server 2005...sounds to me like we can't do any more with the
webform and we might just have wait until version 1.1 and we get it
into the dot net nuke portal...
This sound correct to you?
Best Regards
Peter
www.peternolan.com|||If you want your own frontend then look at the new webform controls that
come with VS 2005, they work with RS 2005.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Peter Nolan" <peter@.peternolan.com> wrote in message
news:1141333522.027909.311300@.j33g2000cwa.googlegroups.com...
> Hi Bruce,
> yes, I mean vs.net 2005...I also have sql server 2005.....I have been
> going through the 'upgrade' process from sql server 2000 + RS and
> vs.net 2003. We are playing around with all the 2005 stuff and
> integrating dundas chart controls.
> We are building a product based on all the MSFT technology stack (music
> to your eyes I am sure)...and we are trying to make it the very best we
> can on all 2005 stuff.
> We want to integrate it into dotnetnuke in the future but it looks like
> it is a bit of work to do and we decided for version 1.0 we would go
> with the out of the box report manager.
> So currently, we want the 'best result' we can get with vs.net 2005 and
> sql server 2005...sounds to me like we can't do any more with the
> webform and we might just have wait until version 1.1 and we get it
> into the dot net nuke portal...
> This sound correct to you?
> Best Regards
> Peter
> www.peternolan.com
>|||Hi Bruce,
we'd like out own but we see it is a lot of work to do....I bought the
hitch-hikers book and I agree with their opinion...too hard...
I also think someone else is going to do it and charge a reasonable fee
for it...failing that, we will put it into dotnetnuke....we don't
want to have to write an application just to present our
reports...there's too much to write...we like DNN as it now has
windows authentication, lots of modules, a developer ecosystem
happening, the source code is availble, and it's the right price.. LOL!
Personally, I'd love to see MSFT and DNN core team work together to
develop a really, really good suite of modules for Report Services.
There is one out there already and I am using it...but I think someone
actually spending a good amount of time and effort on it might be
useful...perhaps I should do that myself!!! Maybe we can use the new
webform inside DNN.....sounds like Version 1.1 to me...and we are
still working on getting V 1.0 out the door...
Best Regards
Peter
www.peternolan.com