Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. The second sql query uses both @search and @discipline in it's criteria (I just cut and pasted your original code) - have you tried removing the references to @seach from the second query.
  2. You will need to recreate the buttons each time the page is refreshed.
  3. What browser / OS are you using? Do you have cookies enabled or disabled? Has it ever worked and this is a recent problem or have you always experienced this problem?
  4. Does this form you are opening and closing instantiate any of these customer controls? If so which controls are they built off?
  5. A Mutant (in this case anyway) is the NT Kernel equivalent of a Mutex. When you are looking at the Profiler does it show which method(s) are allocating these handles? Are you doing anything with threading yourself (either directly or via the various async methods i.e. BeginXXXXX and EndXXXXX functions)?
  6. A web service is nothing more than a web application and will need to be installed on a web server, this could be a physically different machine to the customer facing web server however.
  7. You should be able to do something similar to the following. Dim strReportName As String Dim myDB As New DBAccess Dim myReader As OleDb.OleDbDataReader = Nothing If myDB.Connect("MRCS") = False Then Exit Sub Else Dim myDA As New OleDb.OleDbDataAdapter("spQryComments", myDB.myConn) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'try adding this line myDA.SelectCommand.Parameters.Add(New OleDb.OleDbParameter("@projName", OleDb.OleDbType.VarChar)).Value = MRCSData.Instance.ProjectName ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Create DataSet, fill it and view in data grid Dim myDS As New DataSet("SP") myDA.Fill(myDS, "SP") 'Pass the reportname to string variable strReportName = "rptCommIndividual" 'Get the Report Location Dim strReportPath As String = Application.StartupPath & "\" & strReportName & ".rpt" 'Check file exists If Not IO.File.Exists(strReportPath) Then Throw (New Exception("Unable to locate report file:" & vbCrLf & strReportPath)) End If 'Assign the datasource and set the properties for Report viewer Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument rptDocument.Load(strReportPath) rptDocument.SetDataSource(myDS.Tables(0)) rptViewer.ShowRefreshButton = False rptViewer.ShowCloseButton = False rptViewer.ShowGroupTreeButton = False rptViewer.ReportSource = rptDocument myDB.DisConnect() End If
  8. You can use the AddHandler command to attach an event handler at runtime, if you search these forums you should find a few examples of how AddHandler works.
  9. Either restoring a 2000 backup or copying and then attaching a 2000 db to sql 2005 will work - be aware though that some internal structures (system tables etc.) will be upgraded during either process.
  10. The List<> object has a Contains() method that will tell you if an object is already in the list. Alternatively a Dictionary<> might be more useful Dictionary myObjects = new Dictionary(); MyObject m = new MyObject(); m.name = "yatta"; m.id = 12; m.isBig = true; m.dbl = 12.5; myObjects.Add(m.name, m); as this will easily allow you to check for a key value if ( myObjects.ContainsKey("yatta")) { //key is present }
  11. Does the webservice itself use the Data Layer? If so it will either need to be available to the webservice either on the local machine (usually in the bin folder of the webservice or the GAC), it could be accessed from a remote PC as a stndard file share although this will have implications for your security configuration. Also your sysadmin could have a problem on his hands as depending on your deployment model the web application / webservice themselves will have a bin folder which contains one or more dlls anyway, not sure how that will fit in with his ideas.
  12. Did you try deleting 'end' from the statement?
  13. It's a 'favicon' - search for that and you should get some hits.
  14. If you are trying to log a person on programatically it might be easier to use the Membership class itself. Something like If (Membership.ValidateUser (txtMyUsername.text, txtMyPassword.text)) Then FormsAuthentication.RedirectFromLoginPage (txtMyUsername.text, false) end if should be a starting point.
  15. Why would you want to initialise it if it is a password field?
  16. Whoops - my bad. just remove it and try again.
  17. Not tried it but would something like the following be suitable? Also if you can avoid concatenating strings to build SQL commands you will generally get slightly better performance but more importantly a more robust and secure system. CREATE PROCEDURE [dbo].[spSearchComm] @project as varchar(50), @search as varchar(255),@discipline as varchar(50) AS declare @strOrig varchar(3) set @strOrig = 'Yes' if @discipline = " SELECT * FROM commentsTbl WHERE projName= @project and original= @strOrig and commtitle like @search or commDesc like @search or commAction like @search ELSE SELECT * FROM commentsTbl WHERE projName= @project and original= @strOrig and commtitle like @search or commDesc like @search or commAction like @search and commDisp= @discipline end if GO
  18. This really depends on how you want to access the business rules - these could be packaged up and deployed to COM+ in a manner very similar to VB6. Alternatively you could use remoting or a web service as a means of accessing the business layer from the front end web application.
  19. As long as you aren't hard coding things like connection strings or URLs to web services this shouldn't be too difficult. You could build a deployment package for the web layer and deploy that to one of the 3 machines. Create a separate deployment package for the web service layer and deploy that to a second machine. Depending on how you have designed the Data Layer (i.e. is it a class library) then this might need deploying to the same PC as the webservice. You should then be able to browse to the web layer and hopefully things work.
  20. If you are using a stored proc and only passing in a couple of parameters you shouldn't be needing to concatenate strings anyway. Try something like CREATE PROCEDURE [dbo].[spSearchComm] @project as varchar(50), @search as varchar(255) AS declare @strOrig varchar(3) set @strOrig = 'Yes' SELECT * FROM commentsTbl WHERE projName= @project and original= @strOrig and commtitle like @search or commDesc like @search or commAction like @search
  21. If you have a strongly typed dataset you can access this functionality in a more typesafe manor - something like.... ds.Customers.Customer.AddCustomerRow(...)
  22. User.Identity.Name should return the login name of the current user. This assumes however that IIS is configured to allow Windows Authentication and the ASP.Net app is also set for Windows Authentication - also if you allow anonymous access to your pages the browser will not be required to authenticate and you will have no useful information.
  23. You are probably going to encounter the same problems via Javascript that you are encountering from .Net - the Referer will only contain a valid value when you have been referred to the current page (i.e. following a link or submitting a page).
  24. On what occasions doesn't it work?
  25. Have you tried using css (or css styles) to handle the formatting of the table?
×
×
  • Create New...