By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,672 Members | 1,628 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,672 IT Pros & Developers. It's quick & easy.

Generate SQL Script from ASP.Net

P: n/a
Hello,

I'd like to create the SQL script for any given table, view or proc in my
database, through ASP.Net using VB. I'm building a module library and
providing this code on the fly would ease my pain a lot.

To clarify, I'm looking for the same functionality that would you receive
when you select Generate SQL Script... in Enterprise Manager on an object.
I'm sure there's a proc that creates this output file, however I have no
idea which one it is.

Thanks!!

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com


Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Whats your need then
"David Lozzi" <Da********@nospam.nospam> escreveu na mensagem
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hello,

I'd like to create the SQL script for any given table, view or proc in my
database, through ASP.Net using VB. I'm building a module library and
providing this code on the fly would ease my pain a lot.

To clarify, I'm looking for the same functionality that would you receive
when you select Generate SQL Script... in Enterprise Manager on an object.
I'm sure there's a proc that creates this output file, however I have no
idea which one it is.

Thanks!!

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com

Nov 19 '05 #2

P: n/a
To create the output, not necessarily the files, just the output of the
Generate SQL Script programatically from ASP.Net, not the SQL's Enterprise
Manager. I would like to just specify a table name and have it script it....

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com

"ViewState" <oa*****@ig.com.br> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Whats your need then
"David Lozzi" <Da********@nospam.nospam> escreveu na mensagem
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hello,

I'd like to create the SQL script for any given table, view or proc in my
database, through ASP.Net using VB. I'm building a module library and
providing this code on the fly would ease my pain a lot.

To clarify, I'm looking for the same functionality that would you receive
when you select Generate SQL Script... in Enterprise Manager on an
object. I'm sure there's a proc that creates this output file, however I
have no idea which one it is.

Thanks!!

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com


Nov 19 '05 #3

P: n/a
It's called SQLDMO. Google for it or let us know. Someone would be able to
help you with generating the script. This is a COM Object through. But you
can still use it,

Regards,

Trevor Benedict R
MCSD

"David Lozzi" <Da********@nospam.nospam> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hello,

I'd like to create the SQL script for any given table, view or proc in my
database, through ASP.Net using VB. I'm building a module library and
providing this code on the fly would ease my pain a lot.

To clarify, I'm looking for the same functionality that would you receive
when you select Generate SQL Script... in Enterprise Manager on an object.
I'm sure there's a proc that creates this output file, however I have no
idea which one it is.

Thanks!!

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com

Nov 19 '05 #4

P: n/a
You can look at the system tables for info on name of table and columns.
Like you define your database in one combobox.
then go to another one to pick the table name.
and listbox to pick the columns then you concatenate all the info u selected
in one sql string.
I just cant remember the system tables you have to query to get the info I
just told.
But I think you can find it in the Books Online SQL help
"David Lozzi" <Da********@nospam.nospam> escreveu na mensagem
news:%2****************@TK2MSFTNGP15.phx.gbl...
To create the output, not necessarily the files, just the output of the
Generate SQL Script programatically from ASP.Net, not the SQL's Enterprise
Manager. I would like to just specify a table name and have it script
it....

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com

"ViewState" <oa*****@ig.com.br> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Whats your need then
"David Lozzi" <Da********@nospam.nospam> escreveu na mensagem
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hello,

I'd like to create the SQL script for any given table, view or proc in
my database, through ASP.Net using VB. I'm building a module library and
providing this code on the fly would ease my pain a lot.

To clarify, I'm looking for the same functionality that would you
receive when you select Generate SQL Script... in Enterprise Manager on
an object. I'm sure there's a proc that creates this output file,
however I have no idea which one it is.

Thanks!!

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com



Nov 19 '05 #5

P: n/a
Hi David,

Regarding on your requirement, I think Trevor 's suggestion on using the
SQLDMO components is the one you need. SQLDMO is the components which helps
to finish many tasks in SQLServer database management. In fact the
SQLserver 's enterprise manager is just built on this components. Also,
since the SQLDMO is COM based, we need to call them through COM interop in
..net application.

http://msdn.microsoft.com/msdnmag/is...o/default.aspx

You can find more detailed referrence on SQLDMO in the sqlserver book
online.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "David Lozzi" <Da********@nospam.nospam>
| References: <e7**************@TK2MSFTNGP10.phx.gbl>
<#d**************@tk2msftngp13.phx.gbl>
| Subject: Re: Generate SQL Script from ASP.Net
| Date: Thu, 13 Oct 2005 02:09:31 -0400
| Lines: 41
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Response
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <#o**************@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: c-24-63-42-200.hsd1.ma.comcast.net 24.63.42.200
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:131020
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| To create the output, not necessarily the files, just the output of the
| Generate SQL Script programatically from ASP.Net, not the SQL's
Enterprise
| Manager. I would like to just specify a table name and have it script
it....
|
| --
| David Lozzi
| Web Applications Developer
| dlozzi@(remove-this)delphi-ts.com
|
|
|
| "ViewState" <oa*****@ig.com.br> wrote in message
| news:%2****************@tk2msftngp13.phx.gbl...
| > Whats your need then
| > "David Lozzi" <Da********@nospam.nospam> escreveu na mensagem
| > news:e7**************@TK2MSFTNGP10.phx.gbl...
| >> Hello,
| >>
| >> I'd like to create the SQL script for any given table, view or proc in
my
| >> database, through ASP.Net using VB. I'm building a module library and
| >> providing this code on the fly would ease my pain a lot.
| >>
| >> To clarify, I'm looking for the same functionality that would you
receive
| >> when you select Generate SQL Script... in Enterprise Manager on an
| >> object. I'm sure there's a proc that creates this output file, however
I
| >> have no idea which one it is.
| >>
| >> Thanks!!
| >>
| >> --
| >> David Lozzi
| >> Web Applications Developer
| >> dlozzi@(remove-this)delphi-ts.com
| >>
| >>
| >>
| >>
| >
| >
|
|
|

Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.