Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Friday, March 30, 2012

How to script Sprocs permissions in Management Studio?

I am dissapointed that script options are missing in Management Studio. I
never understand why a good feature goes away in a newer version.
Is there any way to script the permissions for stored procedures?
John Dalberg
Depends on how you script them. If you select the stored
procedure and select "Script Stored Procedure" you won't get
the permissions. If you go from the database level, Tasks
and Generate SQL Scripts (or whatever other ways there are
to invoke the Generate SQL Server Scripts Wizard, you have
more options in the scripting. If you script the stored
procedures for the database and select to include object
level permissions, the grants will be scripted with the
stored procedures.
-Sue
On 10 Mar 2006 19:05:08 GMT, nospam@.nospam.sss (John
Dalberg) wrote:

>I am dissapointed that script options are missing in Management Studio. I
>never understand why a good feature goes away in a newer version.
>Is there any way to script the permissions for stored procedures?
>John Dalberg
|||Sue Hoegemeier <Sue_H@.nomail.please> wrote:
> Depends on how you script them. If you select the stored
> procedure and select "Script Stored Procedure" you won't get
> the permissions. If you go from the database level, Tasks
> and Generate SQL Scripts (or whatever other ways there are
> to invoke the Generate SQL Server Scripts Wizard, you have
> more options in the scripting. If you script the stored
> procedures for the database and select to include object
> level permissions, the grants will be scripted with the
> stored procedures.
Not in SQL Server 2005. I found out later that it can be done at the
database level. Still not as convenient as pre 2005.
John Dalberg
[vbcol=seagreen]
> On 10 Mar 2006 19:05:08 GMT, nospam@.nospam.sss (John
> Dalberg) wrote:
|||Yes...what I wrote was for SQL Server 2005. And I explained
how to do it at the database level in SQL Server 2005.
That's what I wrote from what I can see..."If you go from
the database level..."
-Sue
On 13 Mar 2006 15:36:47 GMT, nospam@.nospam.sss (John
Dalberg) wrote:
[vbcol=seagreen]
>Sue Hoegemeier <Sue_H@.nomail.please> wrote:
>
>Not in SQL Server 2005. I found out later that it can be done at the
>database level. Still not as convenient as pre 2005.
>John Dalberg
>
>
>

How to script Sprocs permissions in Management Studio?

I am dissapointed that script options are missing in Management Studio. I
never understand why a good feature goes away in a newer version.
Is there any way to script the permissions for stored procedures?
John DalbergDepends on how you script them. If you select the stored
procedure and select "Script Stored Procedure" you won't get
the permissions. If you go from the database level, Tasks
and Generate SQL Scripts (or whatever other ways there are
to invoke the Generate SQL Server Scripts Wizard, you have
more options in the scripting. If you script the stored
procedures for the database and select to include object
level permissions, the grants will be scripted with the
stored procedures.
-Sue
On 10 Mar 2006 19:05:08 GMT, nospam@.nospam.sss (John
Dalberg) wrote:
>I am dissapointed that script options are missing in Management Studio. I
>never understand why a good feature goes away in a newer version.
>Is there any way to script the permissions for stored procedures?
>John Dalberg|||Sue Hoegemeier <Sue_H@.nomail.please> wrote:
> Depends on how you script them. If you select the stored
> procedure and select "Script Stored Procedure" you won't get
> the permissions. If you go from the database level, Tasks
> and Generate SQL Scripts (or whatever other ways there are
> to invoke the Generate SQL Server Scripts Wizard, you have
> more options in the scripting. If you script the stored
> procedures for the database and select to include object
> level permissions, the grants will be scripted with the
> stored procedures.
Not in SQL Server 2005. I found out later that it can be done at the
database level. Still not as convenient as pre 2005.
John Dalberg
> On 10 Mar 2006 19:05:08 GMT, nospam@.nospam.sss (John
> Dalberg) wrote:
> >I am dissapointed that script options are missing in Management Studio.
> >I never understand why a good feature goes away in a newer version.
> >
> >Is there any way to script the permissions for stored procedures?
> >
> >John Dalberg|||Yes...what I wrote was for SQL Server 2005. And I explained
how to do it at the database level in SQL Server 2005.
That's what I wrote from what I can see..."If you go from
the database level..."
-Sue
On 13 Mar 2006 15:36:47 GMT, nospam@.nospam.sss (John
Dalberg) wrote:
>Sue Hoegemeier <Sue_H@.nomail.please> wrote:
>> Depends on how you script them. If you select the stored
>> procedure and select "Script Stored Procedure" you won't get
>> the permissions. If you go from the database level, Tasks
>> and Generate SQL Scripts (or whatever other ways there are
>> to invoke the Generate SQL Server Scripts Wizard, you have
>> more options in the scripting. If you script the stored
>> procedures for the database and select to include object
>> level permissions, the grants will be scripted with the
>> stored procedures.
>
>Not in SQL Server 2005. I found out later that it can be done at the
>database level. Still not as convenient as pre 2005.
>John Dalberg
>
>
>
>> On 10 Mar 2006 19:05:08 GMT, nospam@.nospam.sss (John
>> Dalberg) wrote:
>> >I am dissapointed that script options are missing in Management Studio.
>> >I never understand why a good feature goes away in a newer version.
>> >
>> >Is there any way to script the permissions for stored procedures?
>> >
>> >John Dalberg

How to script Sprocs permissions in Management Studio?

I am dissapointed that script options are missing in Management Studio. I
never understand why a good feature goes away in a newer version.
Is there any way to script the permissions for stored procedures?
John DalbergDepends on how you script them. If you select the stored
procedure and select "Script Stored Procedure" you won't get
the permissions. If you go from the database level, Tasks
and Generate SQL Scripts (or whatever other ways there are
to invoke the Generate SQL Server Scripts Wizard, you have
more options in the scripting. If you script the stored
procedures for the database and select to include object
level permissions, the grants will be scripted with the
stored procedures.
-Sue
On 10 Mar 2006 19:05:08 GMT, nospam@.nospam.sss (John
Dalberg) wrote:

>I am dissapointed that script options are missing in Management Studio. I
>never understand why a good feature goes away in a newer version.
>Is there any way to script the permissions for stored procedures?
>John Dalberg|||Sue Hoegemeier <Sue_H@.nomail.please> wrote:
> Depends on how you script them. If you select the stored
> procedure and select "Script Stored Procedure" you won't get
> the permissions. If you go from the database level, Tasks
> and Generate SQL Scripts (or whatever other ways there are
> to invoke the Generate SQL Server Scripts Wizard, you have
> more options in the scripting. If you script the stored
> procedures for the database and select to include object
> level permissions, the grants will be scripted with the
> stored procedures.
Not in SQL Server 2005. I found out later that it can be done at the
database level. Still not as convenient as pre 2005.
John Dalberg
[vbcol=seagreen]
> On 10 Mar 2006 19:05:08 GMT, nospam@.nospam.sss (John
> Dalberg) wrote:
>|||Yes...what I wrote was for SQL Server 2005. And I explained
how to do it at the database level in SQL Server 2005.
That's what I wrote from what I can see..."If you go from
the database level..."
-Sue
On 13 Mar 2006 15:36:47 GMT, nospam@.nospam.sss (John
Dalberg) wrote:
[vbcol=seagreen]
>Sue Hoegemeier <Sue_H@.nomail.please> wrote:
>
>Not in SQL Server 2005. I found out later that it can be done at the
>database level. Still not as convenient as pre 2005.
>John Dalberg
>
>
>
>sql

How to script out my .mdf database I have in Visual Studio?

I'm using Visual Studio 2005 Standard. I have an .mdf database inside my Visual Studio "Server Explorer" under "Data Connections."

How do I script out this database, including the stored procedures in it? In other words, I want to export a SQL script that will create this database.

I'm very much a newbie when it comes to working with database management. I thought I created this .mdf inside my local install of SQL Server 2005 Express, but maybe I did it somehow inside Visual Studio in the Server Explorer. When I open up SQL Server Management Studio Express I don't see this database. I did locate the .mdf on my local C drive but I haven't been able to get Mgt Studio to open it.

Hi hapax_legomenon,

I use the Database Publishing Wizard to script my databases. You can select schema, data, schema and data, and be selective about which database objects you want and don't want. Microsoft wrote it, it's free, and on my list of "must-have" utilities. Here's the URL:

http://www.codeplex.com/sqlhost/Wiki/View.aspx?title=Database%20Publishing%20Wizard

Joe

|||

That's a great tool. Thanks!

how to schedule integration services package(SSIS) 2005 using Management studio?or is there any

Have anyone successfully accomplished scheduling integration services package using management studio? or is there any other way to do this?

i am scheduling the package to run from SQL SERVER Management Studio using SQL Server Agent,but it is not working.

Help is appreciated.Moving to SSIS forum from Bug Reports Forum.|||

devi_anitha wrote:

Have anyone successfully accomplished scheduling integration services package using management studio? or is there any other way to do this?

i am scheduling the package to run from SQL SERVER Management Studio using SQL Server Agent,but it is not working.

Help is appreciated.

Please provide more details about the error. In the mean time try seraching this forum

Wednesday, March 28, 2012

how to save trigger into table in sql 2005

I have found the node for Triggers in SQL Server 2005's Management Studio and tried to create a 'New Trigger...' but when I save, it saves it to an .sql file but do not attach it to the table.

What am I doing wrong here? I can't seem to attach it. And where is this Assisted Editor ...i can't seem to find it anywhere

creating a trigger is like any other sql statement. You can execute them against a database or you can save the script for later use. You want to execute the statement so instead of hitting save try the execute button or hitting F5

|||

THANK YOU SO MUCH, I MADE IT.Big Smile

sql

Monday, March 26, 2012

How to save image to SQL Server 2000

Hi,

I have to store images in database. I have a table which contains field picture which is an image.

How can I do this using C# ?

In Visual Studio .NET i found a code how to obtain BLOB values from the database but I do not know how to do upload an image to the database.

Thanks in advance for your help.

RafiIf you go to theData Access forum and search for BLOB you should be able to find the information you need.

Terri|||Thank you for information. I think I found there everything I needed

how to save a stored procedure with Management Studio?

Hi,

i can make and save a stored procedure in Visual Web Developer (via Database Explorer). It appears then in the list op stored procedure in Management Sudio.

But how to do the same in Management Studio? When i make a sp and i want to save it, Management Studio asks me a name, but put the file in a Projects directory in 'My documents'. It never appears in the list of sp.

Thanks

tartuffe

Simple execute the script. When you make a SP in SSMS, it generates the "Create" or "Alter" statement, so executing the script will not execute the stored procedure, it will create or alter it, accordingly.

|||

Hey,

Try clicking execute instead of the save icon, as the two work differently. Management Studio uses Execute to actually execute against the database, where VWD uses the save button to perform that action, for whatever reason that may be.

|||

Thanks, it works.

Friday, March 23, 2012

How to run SQL Server Management Studio

We have installed SQL Server 2005 on a machine running Windows 2003. We found
out that there is no Enterprise Manager, but Management Studio. We have no
idea how to run this.
We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
removes it from the list.
We hope we can get an answer, because we are a serious evaluating SQL 2005
over Oracle 10g.
Thanks for your help.
Matt
Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
Studio
?
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> We have installed SQL Server 2005 on a machine running Windows 2003. We
> found
> out that there is no Enterprise Manager, but Management Studio. We have no
> idea how to run this.
> We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
> removes it from the list.
> We hope we can get an answer, because we are a serious evaluating SQL 2005
> over Oracle 10g.
> Thanks for your help.
> Matt
|||We would assume that it was that simple, but in the Microsoft SQL Server 2005
menu only Configurations Tools is shown.
We have seen another post with the same problem but they were trying to
install it on XP, while we have installed it on Server 2003.
The installation program seems to run so smooth, so we can't imagine that
something crucial like this was overlooked.
Any help is appreciated.
Matt
"Adam Machanic" wrote:

> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
> Studio
> ?
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
>
>
|||Did you already go back through the installer and make sure that the correct
options were selected? Also try switching into Advanced mode to be certain.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...[vbcol=seagreen]
> We would assume that it was that simple, but in the Microsoft SQL Server
> 2005
> menu only Configurations Tools is shown.
> We have seen another post with the same problem but they were trying to
> install it on XP, while we have installed it on Server 2003.
> The installation program seems to run so smooth, so we can't imagine that
> something crucial like this was overlooked.
> Any help is appreciated.
> Matt
> "Adam Machanic" wrote:
|||Thanks for your help, but I tried already all of that.
The bizarre thing is that it doesn't remove the installation through
Add/Remove Programs, while it takes it from the list. When you try to install
certain components (through Advanced) then it tells you it is already there.
Another problem is that when you install subcomponents it won't let you
install other subcomponents later.
This product definitely has installation issues and I hope they will be
resolved as the pack will now start evaluating (like us) and they're turned
away before they can even try away. A smooth installation is software
marketing 101.
Any help is appreciated. Even help to remove the product.
"Adam Machanic" wrote:

> Did you already go back through the installer and make sure that the correct
> options were selected? Also try switching into Advanced mode to be certain.
>
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...
>
>

How to run SQL Server Management Studio

We have installed SQL Server 2005 on a machine running Windows 2003. We found
out that there is no Enterprise Manager, but Management Studio. We have no
idea how to run this.
We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
removes it from the list.
We hope we can get an answer, because we are a serious evaluating SQL 2005
over Oracle 10g.
Thanks for your help.
MattStart -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
Studio
'
--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> We have installed SQL Server 2005 on a machine running Windows 2003. We
> found
> out that there is no Enterprise Manager, but Management Studio. We have no
> idea how to run this.
> We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
> removes it from the list.
> We hope we can get an answer, because we are a serious evaluating SQL 2005
> over Oracle 10g.
> Thanks for your help.
> Matt|||We would assume that it was that simple, but in the Microsoft SQL Server 2005
menu only Configurations Tools is shown.
We have seen another post with the same problem but they were trying to
install it on XP, while we have installed it on Server 2003.
The installation program seems to run so smooth, so we can't imagine that
something crucial like this was overlooked.
Any help is appreciated.
Matt
"Adam Machanic" wrote:
> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
> Studio
> '
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> > We have installed SQL Server 2005 on a machine running Windows 2003. We
> > found
> > out that there is no Enterprise Manager, but Management Studio. We have no
> > idea how to run this.
> >
> > We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
> > removes it from the list.
> >
> > We hope we can get an answer, because we are a serious evaluating SQL 2005
> > over Oracle 10g.
> >
> > Thanks for your help.
> >
> > Matt
>
>|||Did you already go back through the installer and make sure that the correct
options were selected? Also try switching into Advanced mode to be certain.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...
> We would assume that it was that simple, but in the Microsoft SQL Server
> 2005
> menu only Configurations Tools is shown.
> We have seen another post with the same problem but they were trying to
> install it on XP, while we have installed it on Server 2003.
> The installation program seems to run so smooth, so we can't imagine that
> something crucial like this was overlooked.
> Any help is appreciated.
> Matt
> "Adam Machanic" wrote:
>> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
>> Studio
>> '
>> --
>> Adam Machanic
>> Pro SQL Server 2005, available now
>> http://www.apress.com/book/bookDisplay.html?bID=457
>> --
>>
>> "Matt" <Matt@.discussions.microsoft.com> wrote in message
>> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
>> > We have installed SQL Server 2005 on a machine running Windows 2003. We
>> > found
>> > out that there is no Enterprise Manager, but Management Studio. We have
>> > no
>> > idea how to run this.
>> >
>> > We tried to remove SQL Server, but Add/Remove doesn't remove it. Just
>> > only
>> > removes it from the list.
>> >
>> > We hope we can get an answer, because we are a serious evaluating SQL
>> > 2005
>> > over Oracle 10g.
>> >
>> > Thanks for your help.
>> >
>> > Matt
>>|||Thanks for your help, but I tried already all of that.
The bizarre thing is that it doesn't remove the installation through
Add/Remove Programs, while it takes it from the list. When you try to install
certain components (through Advanced) then it tells you it is already there.
Another problem is that when you install subcomponents it won't let you
install other subcomponents later.
This product definitely has installation issues and I hope they will be
resolved as the pack will now start evaluating (like us) and they're turned
away before they can even try away. A smooth installation is software
marketing 101.
Any help is appreciated. Even help to remove the product.
"Adam Machanic" wrote:
> Did you already go back through the installer and make sure that the correct
> options were selected? Also try switching into Advanced mode to be certain.
>
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...
> > We would assume that it was that simple, but in the Microsoft SQL Server
> > 2005
> > menu only Configurations Tools is shown.
> >
> > We have seen another post with the same problem but they were trying to
> > install it on XP, while we have installed it on Server 2003.
> >
> > The installation program seems to run so smooth, so we can't imagine that
> > something crucial like this was overlooked.
> >
> > Any help is appreciated.
> >
> > Matt
> >
> > "Adam Machanic" wrote:
> >
> >> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
> >> Studio
> >>
> >> '
> >>
> >> --
> >> Adam Machanic
> >> Pro SQL Server 2005, available now
> >> http://www.apress.com/book/bookDisplay.html?bID=457
> >> --
> >>
> >>
> >> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> >> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> >> > We have installed SQL Server 2005 on a machine running Windows 2003. We
> >> > found
> >> > out that there is no Enterprise Manager, but Management Studio. We have
> >> > no
> >> > idea how to run this.
> >> >
> >> > We tried to remove SQL Server, but Add/Remove doesn't remove it. Just
> >> > only
> >> > removes it from the list.
> >> >
> >> > We hope we can get an answer, because we are a serious evaluating SQL
> >> > 2005
> >> > over Oracle 10g.
> >> >
> >> > Thanks for your help.
> >> >
> >> > Matt
> >>
> >>
> >>
>
>

How to run SQL Server Management Studio

We have installed SQL Server 2005 on a machine running Windows 2003. We foun
d
out that there is no Enterprise Manager, but Management Studio. We have no
idea how to run this.
We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
removes it from the list.
We hope we can get an answer, because we are a serious evaluating SQL 2005
over Oracle 10g.
Thanks for your help.
MattStart -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
Studio
'
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> We have installed SQL Server 2005 on a machine running Windows 2003. We
> found
> out that there is no Enterprise Manager, but Management Studio. We have no
> idea how to run this.
> We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
> removes it from the list.
> We hope we can get an answer, because we are a serious evaluating SQL 2005
> over Oracle 10g.
> Thanks for your help.
> Matt|||We would assume that it was that simple, but in the Microsoft SQL Server 200
5
menu only Configurations Tools is shown.
We have seen another post with the same problem but they were trying to
install it on XP, while we have installed it on Server 2003.
The installation program seems to run so smooth, so we can't imagine that
something crucial like this was overlooked.
Any help is appreciated.
Matt
"Adam Machanic" wrote:

> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
> Studio
> '
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
>
>|||Did you already go back through the installer and make sure that the correct
options were selected? Also try switching into Advanced mode to be certain.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...[vbcol=seagreen]
> We would assume that it was that simple, but in the Microsoft SQL Server
> 2005
> menu only Configurations Tools is shown.
> We have seen another post with the same problem but they were trying to
> install it on XP, while we have installed it on Server 2003.
> The installation program seems to run so smooth, so we can't imagine that
> something crucial like this was overlooked.
> Any help is appreciated.
> Matt
> "Adam Machanic" wrote:
>|||Thanks for your help, but I tried already all of that.
The bizarre thing is that it doesn't remove the installation through
Add/Remove Programs, while it takes it from the list. When you try to instal
l
certain components (through Advanced) then it tells you it is already there.
Another problem is that when you install subcomponents it won't let you
install other subcomponents later.
This product definitely has installation issues and I hope they will be
resolved as the pack will now start evaluating (like us) and they're turned
away before they can even try away. A smooth installation is software
marketing 101.
Any help is appreciated. Even help to remove the product.
"Adam Machanic" wrote:

> Did you already go back through the installer and make sure that the corre
ct
> options were selected? Also try switching into Advanced mode to be certai
n.
>
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...
>
>

How to run solution from Visual Studio 2005

Hi.

Is it possible to run solution i have created by MS Visual Studio (filling table from file). I was thinking about schedueling job and launching the solution periodically from stored procedure.
Anyone has idea how these things work?

PKV

VS is used for designing a package. If you want to run your package on a schedule you should use SQL Agent to chedule a SSIS job to run the package.

Wednesday, March 21, 2012

how to run dts package from visual studio

Hi all,

Have tried running a dts package but Im unable to add the reference Microsoft.Sql.managedDts.

Is there any other way that i can do tat from Visual studio code behind page? I need to let the user to

trigger the package from the web application. Thks in advance.

Wei

For those looking for answers, check out this link.

http://forums.asp.net/t/1129202.aspx

Monday, March 12, 2012

How to return a Table to VS using Stored Procedure

i have a Stored Procedure like below but it can't seem to return any table to Visual Studio

Code Snippet

ALTER PROCEDURE dbo.SelectHWCategoryBased

(
@.title varchar /* Like Processor/RAM */
)

AS

SELECT Hardwares.HWID, Hardwares.Title
FROM Hardwares INNER JOIN
Category ON Hardwares.CategoryID = Category.CategoryID
WHERE (Category.Type LIKE '%Hardware%') AND (Category.Title = @.Title)


There is no issue on your SP.

You have to use the SQLDataAdapater to fill the dataset. Use the current command object as SelectCommand of the Adapter & call the Fill() method.. Check with ADO.NET forum

|||

@.title varchar /* Like Processor/RAM */

The default size for an incoming varchar parameter is one character. If your incoming parameter value is longer than one character, it is being truncated, and the WHERE clause is looking for a Category.Title that matches the single character.

Probably won't find one.

Change the parameter to varchar(n) -n being sized appropriate to your Title field.

|||Thanks, that works, missed out that.

Wednesday, March 7, 2012

How to retrieve large string from stored procedure?

Hello! This is my scenario...

Development - Visual Studio 2005
Database - MS SQL 2005

I have written a stored procedure that has a output parameter whose type is NVARCHAR(MAX). Then I use C# to wrap this stored procedure in OLEDB way. That means the OleDbType for that parameter is VarWChar.

This works fine if the string size is less than 4000. If more than 4000, the remaining part will be chopped off. The situation gets worst if I replace VarWChar with LongVarWChar. There is no error nor warning at compiling time. But there is an exception at run time.

So... Does anyone here can help me out? Stick out tongue Thanks in advance.
Have you tried using a C# string datatype?|||Hello! Thanks for the reply. But for do you mean C# string data type here? Hmm... Let me show some codes here to clarify the question. :-)

OleDbParameter prm_Xml = new OleDbParameter("@.Xml", OleDbType.VarWChar, -1);

prm_Xml.Direction = ParameterDirection.Output;

OleDbParameter's constructor needs a OleDbType enumerator for second parameter. VarWChar has a limitation for 4K characters. If I change that to LongVarWchar, then will have a runtime error...
|||

Take a look at this link - http://msdn2.microsoft.com/en-us/library/a1904w6t(VS.80).aspx

Hope this helps

|||Raj, thanks for your prompt reply. Sorry for the late reply.

The link you sent does give me a clear picture of how to store and retrieve data that larger than 8K. But I still wonder whether there is a way to get the data as a output parameter of a stored procedure in OLEDB way.
|||

I think there is an example in the link that uses stored procedure with output parameter and gives VB/C# sample to retrieve it - Was that not helpful?

Take a look at - http://www.dotnet247.com/247reference/a.aspx?u=http://support.microsoft.com/?kbid=317016 and

http://www.dotnet247.com/247reference/a.aspx?u=http://www.kbalertz.com/Feedback_308049.aspx

Hope this helps

How to retrieve large string from stored procedure?

Hello! This is my scenario...

Development - Visual Studio 2005
Database - MS SQL 2005

I have written a stored procedure that has a output parameter whose type is NVARCHAR(MAX). Then I use C# to wrap this stored procedure in OLEDB way. That means the OleDbType for that parameter is VarWChar.

This works fine if the string size is less than 4000. If more than 4000, the remaining part will be chopped off. The situation gets worst if I replace VarWChar with LongVarWChar. There is no error nor warning at compiling time. But there is an exception at run time.

So... Does anyone here can help me out? Stick out tongue Thanks in advance.
Have you tried using a C# string datatype?|||Hello! Thanks for the reply. But for do you mean C# string data type here? Hmm... Let me show some codes here to clarify the question. :-)

OleDbParameter prm_Xml = new OleDbParameter("@.Xml", OleDbType.VarWChar, -1);

prm_Xml.Direction = ParameterDirection.Output;

OleDbParameter's constructor needs a OleDbType enumerator for second parameter. VarWChar has a limitation for 4K characters. If I change that to LongVarWchar, then will have a runtime error...
|||

Take a look at this link - http://msdn2.microsoft.com/en-us/library/a1904w6t(VS.80).aspx

Hope this helps

|||Raj, thanks for your prompt reply. Sorry for the late reply.

The link you sent does give me a clear picture of how to store and retrieve data that larger than 8K. But I still wonder whether there is a way to get the data as a output parameter of a stored procedure in OLEDB way.
|||

I think there is an example in the link that uses stored procedure with output parameter and gives VB/C# sample to retrieve it - Was that not helpful?

Take a look at - http://www.dotnet247.com/247reference/a.aspx?u=http://support.microsoft.com/?kbid=317016 and

http://www.dotnet247.com/247reference/a.aspx?u=http://www.kbalertz.com/Feedback_308049.aspx

Hope this helps

Friday, February 24, 2012

How to retrieve Data from SQL SERVER 2000 ?

Hello,

Im using Visual Studio 2005 to code ASP.NET

How to query my MS SQL SERVER 2000 to retrieve data from my DataBase?

Ive tried some tutorials, but i kept giving me errors
Can you put a simple source code to retrieve something like "select userID, Name, Age from Users"

Thank you,

Are you able to connect to your database?
|||First have you tried the gridview control that auto creates your select statement by you defining options in VS 2005 wizards?

Check out this tutorial on how to do a grid with a simple select statement.
http://www.devx.com/dotnet/Article/22141