Click here to Skip to main content
16,004,479 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionMultiple web site hosting in IIS having multiple domain names with static ip Pin
Vinay Varghese11-Jul-10 0:05
Vinay Varghese11-Jul-10 0:05 
AnswerRe: Multiple web site hosting in IIS having multiple domain names with static ip Pin
T M Gray13-Jul-10 8:43
T M Gray13-Jul-10 8:43 
GeneralRe: Multiple web site hosting in IIS having multiple domain names with static ip Pin
Vinay Varghese13-Jul-10 12:36
Vinay Varghese13-Jul-10 12:36 
GeneralRe: Multiple web site hosting in IIS having multiple domain names with static ip Pin
T M Gray14-Jul-10 9:37
T M Gray14-Jul-10 9:37 
GeneralRe: Multiple web site hosting in IIS having multiple domain names with static ip Pin
Vinay Varghese21-Jul-10 19:24
Vinay Varghese21-Jul-10 19:24 
Questionproblem in implementing validations in dynamically generated textboxes in Desktop vb.net application Pin
Amit Spadez9-Jul-10 2:04
professionalAmit Spadez9-Jul-10 2:04 
AnswerRe: problem in implementing validations in dynamically generated textboxes in Desktop vb.net application Pin
Eddy Vluggen10-Jul-10 23:55
professionalEddy Vluggen10-Jul-10 23:55 
QuestionCreating Triggers Using Managed Code in SQL Server 2005 Pin
brian0048-Jul-10 23:11
brian0048-Jul-10 23:11 
SCENARIO 1 :

I have 3 projects in my solution:

1) Web Project (Presentation Layer)

2) Class Library Project (Business Logic)

3) Class Library Project (Data Access Layer)

Following are the dependencies among these 3 projects:

1->2->3 (It means I have referenced PL in BL and BL in DAL.

In 3(Data Access Layer) i have written a SQL trigger and in the same trigger i am also calling a function of 2(Business Logic) as i have referenced it already. The code looks like following:

[Microsoft.SqlServer.Server.SqlTrigger(Name = "Trigger1", Target = "test", Event = "FOR INSERT")]
public static void Trigger1()
{
SqlTriggerContext triggContext = SqlContext.TriggerContext;
getData obj = new getData(); //getData is a class in (Business Logic)

DataSet insertTriggerDataSet = new DataSet();

if (triggContext.TriggerAction == TriggerAction.Insert)
{
using (SqlConnection conn = new SqlConnection("context connection=true"))
{
conn.Open();
SqlCommand sqlComm = new SqlCommand();
SqlPipe sqlP = SqlContext.Pipe;

sqlComm.Connection = conn;

sqlComm.CommandText = "select * from test";
//sqlP.Send(sqlComm.CommandText);
//sqlP.ExecuteAndSend(sqlComm);

SqlDataAdapter adapter = new SqlDataAdapter(sqlComm.CommandText, conn);
adapter.SelectCommand.CommandType = CommandType.Text;

called= "trigger.cs";
adapter.Fill(insertTriggerDataSet);

}
}

obj.fetch(insertTriggerDataSet); // fetch is a method in class getData in Business Logic

}



Now the problem is, that is i am registering my assembly of (Data Access Layer) in SQL Server 2005 then due to its all dependencies i am unable to do so (as Data Access Layer is dependent on Business Layer and Business Layer on Presentation Layer, and Presentation Layer is internally dependent on many .NET assemblies)



SCENARIO 2

If i convert my data access layer to SQL Server project then it is impossible to give reference of any other project in my Data Layer as SQL Server Project doesn't accepts references other than SQL Server projects.



My need is to call a method X() of Business Layer in that Trigger (in Data Access Layer) and then in that method X() I have to call a method Y() of my presentation Layer.

Can anyone please suggest me any solution or alternative for this problem?...

Also let me make it clear that I am trying to build an auto update data representation control (like grid view) so whenever a new record is inserted in a SQL table that trigger should work and then it should update the data in used data representation control in presentation layer without any button click or similar event, thats why i am calling all functions internally to create an event while that trigger executes. (Reference Example: Facebook Wall, Twitter stream)



Any help will be appreciated...

Thank you.
QuestionDecompression is not producing actual data Pin
ameem858-Jul-10 20:30
ameem858-Jul-10 20:30 
AnswerRe: Decompression is not producing actual data Pin
Luc Pattyn8-Jul-10 23:44
sitebuilderLuc Pattyn8-Jul-10 23:44 
QuestionHow to deliver our Core class library Pin
cullyk7-Jul-10 21:17
cullyk7-Jul-10 21:17 
AnswerRe: How to deliver our Core class library Pin
Ennis Ray Lynch, Jr.8-Jul-10 6:53
Ennis Ray Lynch, Jr.8-Jul-10 6:53 
GeneralRe: How to deliver our Core class library Pin
Luc Pattyn8-Jul-10 8:09
sitebuilderLuc Pattyn8-Jul-10 8:09 
AnswerRe: How to deliver our Core class library Pin
The Man from U.N.C.L.E.8-Jul-10 8:06
The Man from U.N.C.L.E.8-Jul-10 8:06 
GeneralRe: How to deliver our Core class library Pin
cullyk8-Jul-10 14:15
cullyk8-Jul-10 14:15 
GeneralRe: How to deliver our Core class library Pin
The Man from U.N.C.L.E.8-Jul-10 22:24
The Man from U.N.C.L.E.8-Jul-10 22:24 
GeneralRe: How to deliver our Core class library Pin
cullyk8-Jul-10 23:49
cullyk8-Jul-10 23:49 
AnswerRe: How to deliver our Core class library Pin
Eddy Vluggen9-Jul-10 5:25
professionalEddy Vluggen9-Jul-10 5:25 
GeneralRe: How to deliver our Core class library Pin
cullyk11-Jul-10 16:57
cullyk11-Jul-10 16:57 
GeneralRe: How to deliver our Core class library Pin
Eddy Vluggen11-Jul-10 21:29
professionalEddy Vluggen11-Jul-10 21:29 
Questiondependency (injection?) question Pin
Super Lloyd7-Jul-10 14:22
Super Lloyd7-Jul-10 14:22 
QuestionRequest format is unrecognized for URL unexpectedly ending in web method name Pin
phoopwint7-Jul-10 11:34
phoopwint7-Jul-10 11:34 
AnswerRe: Request format is unrecognized for URL unexpectedly ending in web method name Pin
Richard MacCutchan7-Jul-10 11:51
mveRichard MacCutchan7-Jul-10 11:51 
GeneralRe: Request format is unrecognized for URL unexpectedly ending in web method name Pin
phoopwint7-Jul-10 11:58
phoopwint7-Jul-10 11:58 
QuestionHELP: How to remove the Microsoft.NET Framework error dialog by programming? Pin
Curious 20096-Jul-10 15:49
Curious 20096-Jul-10 15:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.