.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SQL/MTS: Automating the Creation of COM+ Components for a Database Schema

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Using Microsoft Windows DNA architecture as a guideline, it's possible to create scalable multitier database applications with COM+ and Microsoft Transaction Services. In fact, you can use existing table definitions to automatically build the MTS/COM+ business logic layer and data access components for your application. This article will walk you through the development of database transactions by mapping the transactions to automatically generated MTS/COM+ components. This technique can greatly simplify the task of creating components for a large project.

Aleksandr Mikunov

MSDN Magazine July 2000

View Complete Post

More Related Resource Links

How to extract a schema from a sql server database



  I need to extract or get the schema from tables in my databse and what is the best way to do it. Is there any third party tool to do it??


Any idea will be appreciated..



Metadata: Create a Database Schema Repository with Meta Data Services in SQL Server 2000


SQL Server 2000 Meta Data Services is a repository technology that stores and manages metadata for SQL Server. Instead of building database schemas over and over, Meta Data Services allows you to freeze an entire schema for use in other projects. You can also use these schemas for training, testing, or debugging. In this article, the authors will review the various components of Meta Data Services and show how it can be programmed using a Visual Basic client, XML, and XSLT. They will also show you how to manage and manipulate your metadata by generating a simple database schema using a SQL Server repository.

Alok Mehta and Ricardo Rodriguez

MSDN Magazine May 2003

Insert permission was denied on Object '', database '', schema ''

i have a senario where in i am trying to insert data into a Database , i end up getting the above error 'Insert permission was denied on Object '', database '', schema '''.We have a DB which has all Storeprocedures and 90% of the tables . the remaining 10% of the tables are in a different database.I am having trouble inserting data into the second database.The storeprocedure is executed as a user who has permission on the DB and tables.Also the storeprocedure is given permission to a role in which the user is a member . The same role doesnt exists in the 2nd Database.I am able to do all DB operations in one environment . i am unable to do the same in the others.

SQL Database Creation Path

Declare   @Path as varchar(500); Declare @mdfpath as varchar(500); Declare   @ldfpath as varchar(500); Set   @Path=(SELECT SUBSTRING(physical_name, 1,CHARINDEX(N'master.mdf',LOWER(physical_name)) -21) DataFileLocation FROM master.sys.master_files WHERE database_id = 1 AND FILE_ID = 1) set   @mdfpath=@Path+'\MSSQL.1\MSSQL\DATA\jjjj3.mdf'; set   @ldfpath=@Path+'\MSSQL.1\MSSQL\DATA\jjjj3_log.ldf';     CREATE DATABASE [jjjj3] ON PRIMARY ( NAME = 'jjjj3', FILENAME = @mdfpath , SIZE = 2048KB , FILEGROWTH = 1024KB )   LOG ON (   NAME = 'jjjj3_log', FILENAME = @mdfpath , SIZE = 1024KB , FILEGROWTH = 10%) The Above procedure creation error b'use of dynamic path of SQL, How to select Dynamic path to file name Thanks K. Govindaraj

Automating Gmail Account Creation

I tried to remove some unnecessary thing like styles but the HTML is still lengthyBelow is the source of: https://www.google.com/accounts/NewAccount?service=mail<html> <head> <title>Google Accounts</title> </head> <body onLoad="return(doKtInit());" > <script type="text/javascript"> var KT_keydownHandler,KT_keypressHandler,KT_logEncoder,KT_lastElement=-1,KT_lastKeyCode=-1,KT_lastModifiers=-1,KT_logElement=0,KT_stoppedLog,KT_ALLOW_FIELD_TYPES={password:1,text:1},KT_ALLOW_FIELD_IDS={firstname:1,lastname:1,email:1,passwd:1,passwdagain:1,identityanswer:1,secondaryemail:1,newaccountcaptcha:1,nickname:1},KT_lastTime,KT_inputs,KT_keyInputs=[];if(window.captureEvents){Event.KEYPRESS&&window.captureEvents(Event.KEYPRESS);Event.KEYDOWN&&window.captureEvents(Event.KEYDOWN)} function KT_preSubmit(){if(KT_logEncoder){if(KT_keydownHandler){KT_encode(16);KT_initHandlers(KT_inputs)}var a=KT_logEncoder;if(a.d!=0){EN_encodeGroup(a,a.p);a.p=0}}}function KT_encode(a){a<0?KT_stopLog():EN_encode(KT_logEncoder,a)}function KT_init(a,c,d){a=KT_logElement=a;if(!a.value)a.value="A";KT_logEncoder={e:a,p:0,d:0};KT_initHandlers(d);c=c;if(!c.value)for(d=1;d<KT_keyInputs.length;d++)c.value+=KT_keyInputs[d].name+" "} function KT_event(a,c){if(KT_logElement.value.length>3E3){KT_encode(17);KT_stopLog

The SELECT permission was denied on the object 'sysjobs_view', database 'msdb', schema 'dbo'.

So, I have an SSIS package that uses a transfer jobs task between Server A and Server B.  When I run the package with my credentials, everything works fine.  However, when I run the package from an SSIS using a different user, I get the following error: Date 9/1/2010 8:00:00 AM Log Job History (xxx) Step ID 1 Server xxx Job Name xxx Step Name Run SSIS Duration 00:00:01 Sql Severity 0 Sql Message ID 0 Operator Emailed Operator Net sent Operator Paged Retries Attempted 0 Message Microsoft (R) SQL Server Execute Package Utility Version 10.0.2531.0 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 8:00:00 AM Error: 2010-09-01 08:00:01.39 Code: 0xC002F325 Source: Transfer Jobs Task Transfer Jobs Task Description: Execution failed with the following error: "An exception occurred while executing a Transact-SQL statement or batch.". End Error Error: 2010-09-01 08:00:01.39 Code: 0xC002F325 Source: Transfer Jobs Task Transfer Jobs Task Description: Execution failed with the following error: "The SELECT permission was denied on the object 'sysjobs_view', database 'msdb', schema 'dbo'.". End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 8:00:00 AM Finished: 8:00:01 AM Elapsed: 0.75 seconds The strange thing is, the user running the job ahs sysadmin permissions

Update Database Schema without redeployment in Entity Framework

Hello. we build an app with 2 layers i.e the presentation and the Business layer which holds the business logic and have the entity framework provide us wtih entities. my question here is is there a way we can change the database schema and not have to redeploy the app to the client.  

problem with sitemap schema 'xsi:schemaLocation' in XML file creation

SqlConnection conn = new SqlConnection(connStr); conn.Open(); string sql = "select top 10 catnum,cast(case when isnull(onhand,0) < 5 then 0 else round((onhand/2),1) end as int) as onhand from dbo.V_OnHand with (nolock)"; SqlCommand cmd = new SqlCommand(sql, conn); XmlDocument doc = new XmlDocument(); XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "UTF-8", null); XmlElement rootNode = doc.CreateElement("inventory"); doc.InsertBefore(dec, doc.DocumentElement); rootNode.SetAttribute("xmlns", "http://seller.marketplace.tests.com/inventory/v1"); rootNode.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); rootNode.SetAttribute("xsi:schemaLocation", "http://sellersupport.domain.test.com/test1/s/schema/inventory/inventory-xml-feed-v1.xsd"); doc.AppendChild(rootNode); XmlElement fbm = doc.CreateElement("inventory"); doc.DocumentElement.PrependChild(fbm); SqlDataReader rdr1 = cmd.ExecuteReader(); while (rdr1.Read()) { XmlElement item = doc.CreateElement("item"); item.Set

WSS_Logging database schema

Are there any sources of information on what the individual columns and tables of the WSS_Logging database mean?  Or is this purely a trial and error process?

"Database schema could not be retrieved for this connection" Error using VWD 2010

After downloading VWD 2010 Express. I drag the SQL Data Source, When trying to establish any type of connection get the error below. I CAN connect using the OLE  (.NetFrame data provider for OLE DB work) but CAN NOT connect using (.NetFrame data provider for SQL server) I have VWD 2008 in another PC and work just fine. I did google and tried several solutions that other had with no luck. I know they were not using VWD 2010 but it was the same error. Again no luck with those solutions. If anyone can share it would be greatly apreciated! Thanks in advance!Jimmy "Database schema could not be retrieved for this connection. Please make sure the connection settings are correct and that the database is online. This server version is not supported. You must have Microsoft SQL Server 2005 or later."    

database schema for online account opening form

what should be the database schema for online account opening form with joint account holders and every participants (in a joint account) have seperate contact and personal detials.Please suggest.

Managing TypedDataSets when there is a change in backend Table / Stored Procedure / Database schema

Hi All, I am just curious to know if there is any easier way to synchronize the TypedDataSets with the chages made to backend Table / Stored Procedure schema.  I use Typed DataSets in my project extensively and I found them very useful and easier to code, but difficult to maintain  The difficuly I have always faced is whenever there is a change in a backend database table structure or stored procedure that is linked to any of the Typed DataSet in our project requires to recreate whole DataSet again by scrapping the old one. The backend changes will not be reflected unless and untill you recreate the whole stuff again. Is there any easier way to synchronize those typed datasets with the changes made to backend database schema or any other workaround that will not required to recreate the whole DataSet again.Hope above question makes sense. Any ideas.

SQL Server - The database log is not available after creation


Hi all,

for our product we create a SQL Server database at install time. The first thing is: we create the database and the second: we create some tables in it. The queries for these actions are performed through SQL Server SMO API by the Database::ExecuteNonQuery function.

Sometimes we get the following error at the second step of creating the first tables in the new fresh database:
The log for database 'x' is not available. Check the event log for related error messages. Resolve any errors and restart the database.

It is not clear how to reproduce this situation. We already know that it can be solved manually by detaching and attaching the database or restarting SQL Server. However we perform automated tests on our product and thus we cannot do these things manually. Furthermore we don't want customers run into this problem. Do you know the cause of this problem or how to resolve it?

many thanx in advance

Difference between Last Processed and Last Schema updated in OLAP Database .

I have a OLAP database in my server.Today I processed the OLAP database using "Analysis Services Process task" using SSIS.After this, I  checked the properties of the OLAP database (AS-->Databases-->Corresponding Database->Right click --> Properties -->), in that , I can see the time is updated in the
1.Last Schema update   and
2.Last update.
    I dont find find any change in the "Last Processed" Time.?
Now I want to know the difference between 1.Last Schema update   2.Last update. and  3.Last Processed.
Your help would be greatly appreciated.

creation of multiple .aspx pages from database name


 hi ,
i am making an internal social networking application for my small organisation where i work  .i have a list of all employee  names in a mssql 2000 database that are the names of 5000 employees of the company  one by one arranged in rows in a single coloumn of a table . i have a folder ,i want to make  .aspx files/pages in that folder ,the file name should be same as names of the person in database coloumn.can any help me with codes to automatically make the .aspx pages with the same names as it is in database coloumn.(note that folder will not take any duplicate values(name will not be repeated)) .i am making application using asp.net 2.0.file will be automatically created in the folder as soon as new name is entered in database.its very difficult to make 5000 aspx page with each employee name and it will be difficult to make new pages again and again after new employees names are entered.so i want that files will be automatically created after employee names are registered.  

thanks in advance.

hoping for help for someone.

database schema prefex


i am using sql server 2008 , i got different tables & store proc having different prefex, How can i change them all to dbo?

Can it be done through sql management studio?

How to get the Task/Components Source Creation Name at Event Handler level


My SSIS Package has Task1 and Task2, there is an Event Handler attached at Package level OnPreExecute event.


Events are captured fine on OnPreExecution of Package, Task1 and Task2 but

I want to capture the Source Creation Name at Event Handler level…I have only variables like SourceID, SourceName, SourceParentGUID and Creation Name at Event level... not the Source Creation Name.


Is there anyway we can capture the Task/Components Source Creation Name at Event Handler level??



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend