Is it possible to generate the t-sql script for a database schema and the
data from .Net(C#) at all?
Cheers
Ollie Riches 6 2041
found this so far http://www.sqlteam.com/item.asp?ItemID=17320
"Ollie Riches" <ol**********@h otmail.com> wrote in message
news:#n******** ******@TK2MSFTN GP12.phx.gbl... Is it possible to generate the t-sql script for a database schema and the data from .Net(C#) at all?
Cheers
Ollie Riches
Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
--
Miha Markic [MVP C#] - RightHand .NET consulting & development www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info
"Ollie Riches" <ol**********@h otmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Is it possible to generate the t-sql script for a database schema and the data from .Net(C#) at all?
Cheers
Ollie Riches
thanks but I don't want a code generator, I am looking for a programmatic
approach to scripting out the database schema and the dat contained in the
database, just like you can through sql server 2000 enterprise manager
Cheers
Ollie Riches
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:eW******** ******@TK2MSFTN GP14.phx.gbl... Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
-- Miha Markic [MVP C#] - RightHand .NET consulting & development www.rthand.com SLODUG - Slovene Developer Users Group www.codezone-si.info
"Ollie Riches" <ol**********@h otmail.com> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Is it possible to generate the t-sql script for a database schema and
the data from .Net(C#) at all?
Cheers
Ollie Riches
The only accessible code I know of for this is in DMO, which is a COM based API. You can find a tiny
(classical VB) example here, among other things: http://www.karaszi.com/SQLServer/inf...ate_script.asp
With 2005, we can use SMO for this, which is managed code.
--
Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ http://www.sqlug.se/
"Ollie Riches" <ol**********@h otmail.com> wrote in message
news:OC******** ******@TK2MSFTN GP14.phx.gbl... thanks but I don't want a code generator, I am looking for a programmatic approach to scripting out the database schema and the dat contained in the database, just like you can through sql server 2000 enterprise manager
Cheers
Ollie Riches
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:eW******** ******@TK2MSFTN GP14.phx.gbl... Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
-- Miha Markic [MVP C#] - RightHand .NET consulting & development www.rthand.com SLODUG - Slovene Developer Users Group www.codezone-si.info
"Ollie Riches" <ol**********@h otmail.com> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. > Is it possible to generate the t-sql script for a database schema and the > data from .Net(C#) at all? > > Cheers > > Ollie Riches > >
thanks
Ollie
"Tibor Karaszi" <ti************ *************** @hotmail.nomail .com> wrote in
message news:eq******** ******@TK2MSFTN GP15.phx.gbl... The only accessible code I know of for this is in DMO, which is a COM
based API. You can find a tiny (classical VB) example here, among other things: http://www.karaszi.com/SQLServer/inf...ate_script.asp
With 2005, we can use SMO for this, which is managed code.
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ http://www.sqlug.se/
"Ollie Riches" <ol**********@h otmail.com> wrote in message news:OC******** ******@TK2MSFTN GP14.phx.gbl... thanks but I don't want a code generator, I am looking for a
programmatic approach to scripting out the database schema and the dat contained in
the database, just like you can through sql server 2000 enterprise manager
Cheers
Ollie Riches
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:eW******** ******@TK2MSFTN GP14.phx.gbl... Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
-- Miha Markic [MVP C#] - RightHand .NET consulting & development www.rthand.com SLODUG - Slovene Developer Users Group www.codezone-si.info
"Ollie Riches" <ol**********@h otmail.com> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. > Is it possible to generate the t-sql script for a database schema and the > data from .Net(C#) at all? > > Cheers > > Ollie Riches > >
Ollie,
Not quite.
You can most certainly write a bunch of queries to read the master db and
peice the info together, and you can leverage on the FillSchema methods, but
ADO.NET is not a schema/script generator.
- Sahil Malik http://codebetter.com/blogs/sahil.malik/
"Ollie Riches" <ol**********@h otmail.com> wrote in message
news:#n******** ******@TK2MSFTN GP12.phx.gbl... Is it possible to generate the t-sql script for a database schema and the data from .Net(C#) at all?
Cheers
Ollie Riches
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matik |
last post by:
Hello,
I need to change collation in my database (more databases acctualy).
Therefore, I wanted to make a script, which will do it at one more
time.
I already have a cursor, updating collation on all tables (fields) in
database.
The problem is, before I will to update the collations, I need to drop
all constrains and pk's.
|
by: drdeadpan |
last post by:
Hi,
I was using enterprise manager to generate a script for my DB. I
scripted only my tables and views and in Options I picked all the
options EXCEPT "script Primary Keys, Foreign Keys and Constraits " (
which I was going to script seperately ). I noticed that the the
generated file still had all FKs and PKs scripted. When I additionally
unchecked the "script Full-Text indexes" option, it worked as expected.
Any idea why the full-text...
|
by: Martin_Hurst |
last post by:
Has some one come up with a similar type script that could be used in a
Postgresql database?
The script below was created for a SQLServer database.
Thx,
-Martin
++++++++++++++++++++++++++++++++++++++
http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci913717,00.html
In the early stages of application design DBA or a developer creates a data
|
by: bizt |
last post by:
Hi,
Is it possible to obtain the width/ height of an image when that image
is dyanically created using a PHP script and passing GET attributes.
For example:
<img src="images/showImage.php?image_id=5" />
My images are created from images stored on the server, their paths
stored on in database table and retrieved using the GET image_id and
|
by: dawnerd |
last post by:
I am having troubles with my script. It is supposed to generate a
"map" from a serialized array stored in a database. However, it is not
generating any html. I know the data is being retrieved from the
database and being unserialized properly as I've tested that. It seems
to not go through the loop.
/**
* function drawMap( $startx, $starty, $p1, $p2, $p3 )
* Generates html for output.
*/
| |
by: lavadan |
last post by:
Hi Folks,
I am a newbie to VB Script. I need to generate the following XML document using VB Script. Can you please advise me on this? I can manage at least if I know the concept of generating XML using VB Script.
<?xml version='1.0"?>
<authors>
<author>
<firstname>john</firstname>
<lastname>norton</lastname>
<publishingcompany>westwind inc</publishingcompany>
|
by: Aswanth |
last post by:
I'm Generating Reports in SSRS-2005..
Previously I got the Data from One Database & Generated Reports.. Now I used to get the Data from Two Different Databases(ie Database-1 & Database-2) & to generate the Reports..
I'm having one Stored Procedure(Get_Data) which will combine Two databases & get the data from them.. It is working fine for Me..(I tested in Sql Server Management Studio)..
But it is Not working fine in my Visual Studio.. ...
|
by: csharpula csharp |
last post by:
Hello,
I need to generate cs files from XSD files. I would like to do it
automatically. What is the best way to do it? Is it better be done with
PreBuild inside VS (before compilation) or to activate this action
outside of VS in extrenal script (and not on each compilation)?
Thank you!
*** Sent via Developersdex http://www.developersdex.com ***
|
by: nmsreddi |
last post by:
Hi friends
recently i have started working on SQLserver 2005 as DBA for my project .
when i tried to generate script for my Database i was confused to find two options for scripting in management studio.
1. cript DataBase as and 2. Tasks-->Generate Script..
what is the difference between these two options ,which is to be used mostly
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |