SQL Process Design Connect To Multiple DBs?
Aug 11, 2010
Web server running an ASP.NET site that's connected to a sql server instance for all the web related DB needs (products, pricing, users, etc.)...
The companies accounting, inventory control(FIFO, etc.) and whatnot are mainly done on another system which uses a different SQL server...much more complex, for obvious reasons.
What I Need
What I need is to retrieve the current quantity on hand for every product that's on the web by connecting to the internal accounting sql server, even though the website uses a different sql server for it's own requirements.
The reason I can't have the information that is required to calculate the quantity on hand for every product on the web to be on the same sql server is because there are way too many tables that are needed to calculated that information...what's on purchase order, what's on sales order, and the physical inventory.
What is the best way to accomplish this without altering either database?
View 1 Replies
Similar Messages:
Feb 1, 2010
I am looking to connect to our mail server and process attachment. The attachments are plain text files. Any DLL / API for this. We have sun communication express.
View 3 Replies
Aug 31, 2010
I have code that runs under IIS6 & ASP.Net 2.0, that won't run under IIS7.5 on Windows Server 2008 R2. I am assuming I have a configuration problem - but I don't know. On a Windows Sever 2008 R2 system: From inside IIS (v7.5), an ASP.NET process will not connect to port 21 (ftp) on the ICS (using System.Net.Sockets.Socket), it fails, logging an error that it cannot connect to the system at nnn.nnn.nnn.nnn. But, from a command prompt on the same server though, I am able to connect via ftp to the system at nnn.nnn.nnn.nnn. I am using the DefaultAppPool.
Here's a code snippet:
[Code]....
And the connect throws an exception - unable to connect I'm firing up wireshark soon and I'll see what if anything is getting across the wire? particularly if you think it's administrative in nature, cause that's a real weak point for me.
View 2 Replies
Nov 27, 2010
I have an unknown number of image buttons inserted into a Placeholder at runtime during a webpage's Init stage. I would like to use a single event handler routine in C# language to determine which control was clicked and process any one of them differently. How do you create an event handler to process whichever image button that is clicked?
View 2 Replies
Feb 27, 2011
I have a doubt. For examples, Multiple users trying to update the same record usign asp.net application.
Can any one explain me indatil the situation how db process the request.?
View 1 Replies
Sep 23, 2010
I want to dynamically build a table where each of the first three cells may or may not contain an image. If a cell contains an image, it may or may not contain a radio button. The last cell contains a button or link button. I want all the buttons to be handled by the same click event. The number of rows, which cells will have an image, and which cells will have a radio button is not known at design time. Finally, the images are displayed using the better image control.
I'm trying to get this to work usinging a repeater, but at the moment I can't get the radio button checked propety to change from the default value. I'm using an arraylist as a datasource. I thought of using a gridview, but I don't know how to add a radio button and a better image control to a cell.
View 4 Replies
Feb 23, 2011
My requirement is i need to display some quotes from some vendors in my User Interface. Some of the quote details will be fetched from database where as some vendors are giving web services to get the quote results. I need to combine the quotes from database as well as the various web service response and display in the grid.
View 1 Replies
Jun 8, 2010
i want to know how to connect to multiple databases in sql from our asp.net code??
View 4 Replies
May 7, 2015
how to connect to multiple database?
View 1 Replies
Feb 25, 2011
the form has 15 items to choose with radio buttons, any number can be selected. I would like to process them as a 'group' so I can do something like loop thru them, checking if each one has been selected to build a list and also be saving them to a table row, etc but it seems all the designations as a list or group make it mutually exclusive. just looking for better coding than checking them with an if statement or similar so the question is if there is some way to designate the radio buttons as a group but no force the group to be mutually exclusive
View 4 Replies
Sep 28, 2010
I want to develop a Chart control in asp.Net 3.5 where in each section 2 data are comparing each other(like multiple Column) . In my attachment image that is first One.
View 1 Replies
Jul 23, 2013
The user enter the name,address,country,qualifiction,experience the user enter more than one qualification, and experience the add another button click will add another qualification, and experience...i am confused in designing the database how to design the database for this . i am design this tables .
==employee table== ===Qualification== ==Experience===
employee_id qualificatin-id Experience_Id
employee_name University Company
employee_address Degree Year-of-0experience
employee_qualification End_Date employee-id
employee_Experience employee-id
View 1 Replies
Jun 10, 2010
A relative newcomer to .net MVC2 and the entity framework, I am working on a project which requires a single web application, (C# .net 4), to connect to multiple different databases depending on the route of access, (ie subdomain).
No problem with this in principle and all the logic is written to transform the subdomain into an entity connection and pass this through to the Entity Model.
The problem comes with the fact that the different database whilst being largely similar in structure contain 3 or 4 unique tables bespoke to that instance.
To my mind there are two ways to solve this issue, neither of which i am sure will be possible.
1/ Use a separate entity model for each database. -Attempts down this route have through up conflicts where table/sp names are the same across differnt db's, or implicit conversion errors when I try and put the different models in different namespaces. or
2/ Overwrite the classes which refer to the changeable database objects based on the value of a base controller property.
My question is if either of theser routes can ever work in principle or if i should just give up on the EF and connect to the dtabases directlky using ADO. Perhaps there is another way to solve this problem i haven't thought of?
View 1 Replies
Jul 20, 2010
Is it better to have the calculated field returned with the rest of the results or is it better to calculate it later when you need it?
Example: I have a GridView that displays search results that has many fields like:
Application ID
Name
Account Type
Account Number
etc.
The account number field is not always consistently the same thing though. For accounts of type A they are eight digits long and for accounts of type B they are twelve.
After the search if they select a record and choose to continue the application I need to check the eigit digit account number for any access restrictions. All accounts of type A and B have an associated eigit digit account number, it is just that type B are the only ones to have the twelve digit number.
So should I add a redundant hidden field like "Common Account Number" to the search results and just hide it, thus making the heavily used search take slightly longer and making the results grid take up more space in the view state?
Or
Should I call the database when they try to continue the application and translate the Application ID into the eigit digit number so that I can use it to do my access restriction check? This will require one extra call to the database but the translation should be fast as both fields are in the same table and the application ID is a primary key. The continue application button will be used less as there are many other command options.
View 2 Replies
Nov 14, 2013
i have a dropdownlist contaning years..now i want to connect my database by dropdown selection.if i select 2013 it will connect 2013 database ,if i select 2014 it connect 2014 so on..
View 1 Replies
Sep 7, 2010
I've written a aspx.net(C#) page that after the user has done what they do on the page they hit a Submit button. The Submit button
1) takes the work the users was producing on the page and writes it to a file.
2) attempts to execute a batch file.
The call to the batch file is executed via:
protected void Execute123EDI()
{
try
{
string File = @"c:80sAdminSendV80s.bat";
lblCancelled.Text = lblCancelled.Text + File;
Process proc = new System.Diagnostics.Process();
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.LoadUserProfile = false;
proc.StartInfo.UserName = "administrator";
proc.StartInfo.RedirectStandardOutput = true;
System.Security.SecureString secPass = new System.Security.SecureString();
string paswd = "123abc";
for (int i = 0; i < paswd.Length; i++)
{
secPass.AppendChar(paswd[i]);
}
proc.StartInfo.Password = secPass;
proc.StartInfo.FileName = File;
proc.Start();
FileStream fs = new FileStream(@"c:80sAdminSendV80sOutput.log", FileMode.Append);
StreamWriter sw = new StreamWriter(fs);
sw.Write(proc.StandardOutput.ReadToEnd());
proc.WaitForExit();
sw.Close();
proc.Close();
}
catch(Exception ex)
{
lblDebug.Text = lblDebug.Text + ex.Message + "<br/>";
}
If I watch the processes tab in Task Manager on the web server I see "cmd.exe" under the context of 'administrator' but it just hangs. For test purposes c:SendV80s.bat: copy c: oot.ini c:zzz.txt
If I logon onto the webserver's console and execute SendV80s.bat it works and exits without issue. But when I execute the same batch file via the Submit button it gets stuck executing in Task Manager/Process. I believe this has something to do with the fact that cmd is not running in a full environment/desktop context. I just noticed this on the actual console of the webserver (not in my RDP console but console 0 instead)
A pop-up box stating: CMD.exe Application error The application failed to initialize properly (0xc0000142). Click OK to terminate the application. And when I click on the OK button my ASPX page's WaitForExit is satisfied and the continues processing normally.
View 2 Replies
Jul 21, 2010
I know that similar questions have been asked all over the place, but I'm having trouble finding one that relates directly to what I'm after.
I have a website where a user uploads a data file, then that file is transformed and imported into SQL. The file could be up to 50mb in size, and some times this process can take 30 minutes or sometimes even longer.
I realise I need to palm off the actual work to another process, and poll that process on the web page. I'm wondering what the best approach would be though? Being a web developer by trade, I'm finding all this new Windows Service stuff a bit confusing, and I just wanted somewhere to start.
So:
Can I do / should I being doing this with a windows service? if so, how?
Should I use WCF? If this runs under IIS, will I have problems with aspnet_wp.exe recycling and timing out my process?
clarifications
The data is imported into sql, there's no file distribution taking place.
If there is a failure, it absolutely MUST be reported to the user. The web page will poll every, lets say, 5 seconds, from the time the async task begins, to get the 'status' of the import. Once it's finished another response will tell the page to stop polling for status updates.
queries on final decision
ok, so as I thought, it seems that a windows service is the best idea. So as to HOW to get it to work, it seems the 'put the file there and wait for the service to pick it up' idea is the generally accepted way, is there a way I can start a process run by the service, without it having to constantly be checking a database table / folder? As I said earlier, I don't have any experience with Windows Services - I wondered if I put a public method in the service, can I call it somehow?
View 2 Replies
Feb 26, 2010
I'm working on an ASP.net app I'm trying to execute a process remotely , using System.Diagnostics.Process class here's my code:
ProcessStartInfo startInfo = new ProcessStartInfo(@"C:TestCommand.exe");
startInfo.Domain = "myDomain";
startInfo.UserName = "MyUserName";
SecureString sec = new SecureString();
foreach (char item in "MyPassword")
{
sec.AppendChar(item);
}
sec.MakeReadOnly();
startInfo.Password = sec;
startInfo.UseShellExecute = false;
Process.Start(startInfo);
I keep receiving an exception with the message "Logon failure: unknown user name or bad password". Im absolutelly sure that i'm submiting my correct username/pwd
View 1 Replies
Apr 3, 2010
I've developed a popup email .aspx used on our intranet based web app that is auto generated with .pdf's attached. I'm developing with VS 2008 ASP.Net 3.5 C# and System.Net.Mail.MailMessage. I can create and send the email with no issues. The problem is with any attempt to open or delete the attachments I get the above error. The .pdf's a copied with the following code:
FileStream fsr = new FileStream(inFilename, FileMode.Open, FileAccess.Read, FileShare.Read);
BinaryReader reader = new BinaryReader(fsr);
byte[] bytes = new byte[fsr.Length];
reader.Read(bytes, 0, bytes.Length);
FileStream fsw = new FileStream(outFileName, FileMode.Create, FileAccess.Write, FileShare.Write);
BinaryWriter writer = new BinaryWriter(fsw);
writer.Write(bytes, 0, bytes.Length);
// clean up
writer.Flush();
writer.Close();
writer = null;
fsw.Close();
fsw.Dispose();
fsw = null;
reader.Close();
reader = null;
fsr.Close();
fsr.Dispose();
fsr = null;
Later after sending the email I:
mailMessage.Dispose();
mailMessage = null;
foreach (string fileName in attachments)
{
if (File.Exists(fileName))
File.Delete(fileName);
}
The error occurs at: the File.Delete(fileName);
how I can delete or reopen these files after sending the email?
View 9 Replies
Dec 25, 2010
Dear ladies and sirs.
I have a .NET infra code running both within the IIS worker process and within a desktop client app. How can the .NET code determine whether it is running within an IIS worker process?
I know that I could check the name of the process (w3wp.exe, for instance), but I would like a more robust approach. I wish to make a side note. This is not a production need. I need this information to enable certain scenarios useful during the development and testing phase. Specifically to ease the testing of secure vs non secure configurations.
View 3 Replies
Jan 26, 2010
When I hit the run button (in my Default.aspx), a process starts (this process contacts a webservice to get some files, etc). How do I: Ensure that only a single process is running at a time (i.e. if I refresh the browser, I don't want to start the process a second time)Track progress - there are 4 points of the process (at 25%, 50%, 75%, 100%) that I want to track, and when each part completes, I want to update the progress bar. I have a status object for the running process, but the question is how to update the progress bar automatically? Do I need to use threads to achieve the above two?
View 1 Replies
Nov 6, 2010
My code is that I want to create a log file and log it upon a new user browsing the site. However, what i did was I put in a 6 second delay and then used another browser to access the page. And it threw an Exception saying it is being used by another process which is true. So how come I set it so that, if IT is being used by another process, WAIT and retry every 500 milliseconds until it becomes free/available?
here's the code:
protected void Page_Load(object sender, EventArgs e)
{if (!IsPostBack) // if this is the first time page loads, set k to 1
{ lognewuser();
}}
[Code]....
View 1 Replies
Mar 28, 2011
I am having the text file which is used to track all the ip address which is available in the network and replace the content from"Reply from 172.29.116.3: bytes=32 time=1ms TTL=255" to 172.29.116.3.
For this task i am having 2 functions 1.runCMD() Function is used to create a file which ping all the ip address between 3 to 254 ("Reply from 172.29.116.3: bytes=32 time=1ms TTL=255").
2.Another function textFileReplace() which is used to replace the text from "Reply from 172.29.116.3: bytes=32 time=1ms TTL=255" to 172.29.116.3.
This process will continue every 30 minutes..
But i am having the error while accessing the function textFileReplace() as The process cannot access the file 'C:inetpub' because it is being used by another process.
View 4 Replies
Mar 17, 2011
I have requirement that have to add header and footer into 50 over reports. So I dont want to change one by one.
Is there a way to create master page header and footer and used it in multiple reports?
View 1 Replies
Feb 23, 2010
can't connect to sql 2005 express sp1 and vs is also sp1. 2) Which my guess is because of the database connection not being able... design view is not able to pull in the application for design, it's as if there is no theme and css just white background and black print.
View 1 Replies