473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Generate SQL Script from ASP.Net

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
5 1633
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jerry | last post by:
Hi there: Does somebody have a solution to this one ? : How can I get a script to send two subsquent pages. Example: My script accepts form data and shows a preliminary "Thank you" page...
1
by: Gonzalo Aguirre | last post by:
hi.. as i write on the topic, i'm programing a Bash script using the standard GNU Linux text utilities (gawk, grep, sed, and so on) that get information from SQL source (table attib, type per...
1
by: JStrummer | last post by:
Any recommendations on how to generate an INSERT SQL script for the records in a tab-delimietd text file? The limitation is that, while I do have command-line mySQL access locally, I do not at my...
1
by: Terri | last post by:
I'd I have a problem I'd like to post CREATE TABLE and INSERT statements that will create my table and insert data into the table. I can use the scripting feature in Enterprise Manager to...
4
by: k.mitz | last post by:
Hi, I have a PHP application that allows users to generate a .pdf report of their database content. Normally, I've had to refresh a page to call the script to generate the report, so there's a...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
1
by: Chris Zopers | last post by:
Hello, I want to generate a SQL Script of a SQL Server database. To do this, I right-click the database name and choose the option All Tasks/Generate SQL Script. Than I get a text file with a...
13
by: gamernaveen | last post by:
I am coding a script , where basically the user has to enter his name , choose file , file comments if required and upload. The file comments , name , filename will be stored in the database with...
23
by: Geoff Cox | last post by:
Hello, Is it possible to use php to generate different menus for users who have access to files in different folders? For example, user Fred might be able to access files in folders A, B and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.