
Rattlesnake
Avatar/Signature-
Posts
47 -
Joined
-
Last visited
About Rattlesnake
- Birthday 09/17/1977
Personal Information
-
Visual Studio .NET Version
2003
-
.NET Preferred Language
VB.Net
Rattlesnake's Achievements
Newbie (1/14)
0
Reputation
-
Hi, I have an application that has Sql Server 2000 as the database. This application is used in different Offices of our comapny around the world with each Office having there own independent Sql Database. For global reporting purposes I would like to create an instance of the Database that would receive all the transactional information from all the databases from all the companies. This would give us a repository for generating global reports. I have taken a look at Replication in Sql Server , but it seems that it is used for synchronizing different databases. I donot want synchronisation . The independent databases of all the offices will continue to work the way they are. All I want is that all records in the database should be sent to one centralised database. How can I implement this ?? Thanks
-
Hi , In Sql Server 2000 I have a Log table "Logs" that conatins the fields 1. OrderNo 2. SequenceID There is another table "Sequences" , that has the fields 1. SequenceID 2. DeliveryDate In the Log table there can be multiple records for an Order with different SequenceID. e.g. OrderNo : SequenceID _______ :___________ 1 : 5 1 : 10 1 : 15 2 : 6 3 : 11 3 : 18 And the Sequences table is e.g. SequenceID : DeliveryDate __________ : ____________ 5 : 02/01/2007 6 : 02/05/2007 10 : 02/10/2007 11 : 02/12/2007 15 : 02/13/2007 18 : 02/16/2007 Now each SequenceID corresponds to a DeliveryDate from the Sequences tabele I want to create a query that will give me the Min(DeliveryDate) for each Order along with the corresponding SeqeunceID So basically I want to know the earliest delivery date for an Order and the SequenceID to which this earliest delivery date corresponds to. What will be the Query for this ??? Thanks
-
Hi, I have a ASP.Net 1.1 application with a Sql Server 2000 Database. I have an orders table that contains the details of an order. There are orders from 2005 to till date. I am displaying these orders in a Datagrid. The user has the option to search the Orders table using many criteria (around 8 to 10) criterias. I am uisng a DataTable as the DataSource for the Datagrid. Below is the Code for the datasource Private Sub BindData() Dim dv As DataView sqldataadpater1.Fill(DsOrdersList1) dv = DsOrdersList1.Tables(0).DefaultView If Not viewstate("SearchString") = "" Then dv.RowFilter = viewstate("SearchString") Else dv.RowFilter = Nothing End If Datagrid1.DataSource = dv Datagrid1.DataBind() End Sub I am using a SQL Server Stored Procedure as Command for the data adapter Offcourse with the above technique , at the server end ALL the Orders table records are put into the Datable and then filtered based on the ROWFILTER. With the increase in the Order Records , the search and display is getting SLOWER. What other technique can I use to retrieve the records from the database , keeping in mind that I want to keep the option of filtering the records by the 8 to 10 criterias that I have. The only way I can think of is using DYNAMIC SQL in the stored Procedure and send the Filter criteria to the stored Procedure. Offcourse this will result in a performance hit. Are there any other ways ?
-
Hi , I have a ASP.Net 1.1 application that uses an XML file (AppConfig.xml) to read configuration parameters The XML file looks like this <AppParameters> <Global> <Parameter1 value="1000" /> <Parameter2 value="True" /> <Parameter3 value="Approve" /> </Global> <OrderList> <ShowCol6 value="True" /> <ShowCol7 value="False" /> <ShowCol8 value="False" /> <OrderList> <DeliveryList> <Parameter1 value="True" /> <Parameter2 value="True" /> <Parameter3 value="500" /> </DeliveryList> </AppParameters> It has multiple sections (a section for each application module). Each section has different parameters. I want to have a ASP.net page that will LOAD and DISPLAY all theses parameters. I want to be able to modify them and SAVE them back to the XML file Basically what I am looking for is to recursively read an XML file that has the above structure and be able to update each Parameter. Thanks for ur help
-
Update multiple records in a dataset
Rattlesnake replied to Rattlesnake's topic in Database / XML / Reporting
I want to update muliple records in a DATASET. Eventually this DATASET will be used to update the Database. But my question is how to update multiple records in a DATASET ??? Thanks -
Update multiple records in a dataset
Rattlesnake replied to Rattlesnake's topic in Database / XML / Reporting
I know the query but how do I run this on a Dataset table???? -
Hi, I have ASP.Net 1.1 application. It contains a form that has a Dataset that contains one table "Orders". It contains the below fields OrderNumber OrderDate OrderSequence OrderSequence is a sequence number from 1,2,3........... I display the Orders in a datagrid using Orders dataset as source (Sorted by OrderSequence) .The datagrid contains a Textbox displaying the OrderSequence column. I am trying to implement a mechanim=sm that will allow the user to change the sequence of the Order to allow him to move the Order up and down the sequence. When the user changes the OrderSequence , I want to change the OrderSequence in all the Order rows. For e.g. if the user changes the OrderSequence of a row from "20" to "10" , I want to update the OrderSequence of all rows in the Orders dataset to "OrderSequence + 1" for all those rows that have OrderSequence of 10 or greater. How can Update multiple records in s Dataset using a sql query ???????????
-
Fire the TextChanged event of a texbox from Javascript
Rattlesnake replied to Rattlesnake's topic in ASP.NET
Hi MrPaul, The date for ETD will be selected from a pop-up window that contains a calendar control. When the user selects a date in the pop-window a javascript function assigns the selected date to the ETD control in the calling form like below function SetDate() { window.opener.document.forms["<%= FormName %>"].elements["<%= ControlName %>"].value = "<%= SelectedDate %>"; window.close(); } Can I call the __doPostBack("ctl00_content_Quantity", "") function from the pop-up window ?? Thanks -
Hi, I have an ASP.NET 1.1 form It contains the following controls 1. Quantity (textbox) 2. ETD (textbox) 3. Customer (dropdown) I have a TextChanged for the Quantity control that runs a Server procedure "RUNCHECKS" The ETD is a Date field. The user cannot enter the date into this field manually . I have an image on the form that when the user clicks on opens up a pop-up calender and he selects the date from the calendar. When a date is selected it is automatically assigned to the ETD textbox.This is all done using Javascript How can I fire the TextChanged event for the ETD textbox control that will run the "RUNCHECKS" method. Thanks
-
Hi, I have a table "SWReports" that stores the Service Reports of our engineers. The table structure is as follows: SWReports ----------- 1. ReportNo 2. EmpNo 3. WeekNo 4. HrsWorked 5. ReportStatus (Approved or WaitingApproval) An engineer can have MULTIPLE Reports for the same week. I want to create a query that will give me the Hrs Approved and Hrs WaitingApproval for each employee PER WEEK Something like this 1. EmpNo 2. WeekNo 3. ApprovedHrs (Sum of HrsWorked in reports that are Approved) 4. WaitingHrs (Sum of HrsWorked in reports that are WaitingApproval) How can I build this query? Fo rinfo, the table is stored in a MS SQL Server Database
-
Hi, Below is the code that I currently have Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) ' Fires when the session is started Dim sid As String Dim UA As New UserAccess UA.AssignAccess() UA = Nothing End Sub Public Function AssignAccess() As Boolean 'Code to check if HttpContext.Current.User.Identity.Name exists in USER table. IF DoesnotExist ' User doesnot have access to the application so redirect him to page "Useraccess.aspx" ' that displays a message that the user doesnot have access to the application Dim rdirectpath as String rdirectpath = "/" + "TestApplication + "/UserAccess.aspx" HttpContext.Current.Response.Redirect(rdirectpath) End If End Function '-------------- Page Load of the UserAccess.aspx page ----------------------------------------------- Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim NoAccessError As String NoAccessError = "You dont have access to this application" lblError.Text = NoAccessError Session.Clear() Session.Abandon() End Sub With this code , what happens is that the user is redirected to the UserAccess.aspx page the first time. If he copies the link http://server1/App1/Default.aspx and pastes it in the same window , the user user is redirected to the UserAcess.apsx page again. But if he pastes it a second time , the user is NOT redirected to the Useraccess.apsx page , but reaches the Default.aspx page. The Session.Abandon code is not run when he pastes the link a second time. This is my problem :( Thanks
-
One more point is that the access to the application will be controlled by a non-technical guy (the department head), so I need a user interface for him to add/delete users. I dont think that would be possible using the web.config solution.
-
But then I will need to update the web.config everytime I need to give a new user access to the application. And changing the web.config resets the application.
-
Hi, Sorry for not having explained it more clearly earlier. I DONT want all the users in my domain to have access to this application. Only a few employees from a specific department need to have access to this application. To specify these users I need to have a table that contains the usernames of the users that should have access to the system.
-
Hi, I have developed an ASP.Net (1.1) application. It uses Windows Authentication. I have a database that contains a USERS table that list all the users that have access to the application. In the Session_Start sub I read the Request.ServerVariables("LOGON_USER") variable and check the USER table for this username. If the username doesnot exist in the USERS table i redirect him to a webform (UserError.aspx) that displays a message that he doesnot have access to the system. In the page Load of this form I call Session.Clear() and Session.Abandon(). This seems to work fine , but with one glitch. If the user access the application for. e.g. http://server1/App1/Default.aspx It takes him to the UserError.aspx page. If he refreshes the page once it again takes him to UserError.aspx. But if he refreshes the page a second time , it takes him to the Default.aspx page. I have noticed that on the 2nd refresh the Session.Clear and Session.Abandon are not run. Any ideas why??? Is there a better way of restricting access to the application. I don't want to use forms authentication. Thanks