Jump to content
Xtreme .Net Talk

vnarod

Avatar/Signature
  • Posts

    87
  • Joined

  • Last visited

Everything posted by vnarod

  1. Second one should be faster since in the first example both comparisons will always be checked, even if first one is false
  2. there is a sample called Bootstrapper.exe. It does exactly what you need.
  3. But it should be in the center by default! I am sure, somewhere in registry or somewhere else there is now an entry that makes it appear in the corner. But where???
  4. But connection is supposed to stay open. I open it at the beggining and close when application ends. Why would multiple ExecuteReaders (around 20) make the program hang?
  5. I had a cascading error and was getting message boxes with errors in a cascade mode, i.e. each one moved down and right from previous. I have fixed the error, but non ALL message boxes are shown in lower right corner instead of center. Reboot didn't help. How to reset it so that boxes are in the center again?
  6. In you example b I will still need to have a third class (interface). Wouldn't this be simpler then? Class A Inherits Forms.Form Class B ' (form) Inherits A
  7. I would like my form to inherit functions from another class(not a form). Since I have to inherit from Form and VB allows only one Inherits statement, the only way to do that is to create an intermediate form that would inherit from my class, and then inherit from it. Is this correct?
  8. Thank you. Unfortunately, there are no errors in this case so Catch never gets executed anyway.
  9. My program hangs after several clicks that access database. It does not matter what items I click, even if I click the same two buttons that are calling the same sub it hangs after a few times (everytime different number). I have no idea where to start investigating. Can someone show me the right direction? All I do with database is get a DataReader: Dim dr As OleDbDataReader = oDbAccess.GetData(sSQL) Return dr Public Function GetData(ByVal sSQL As String) As OleDbDataReader Dim oCmd As OleDbCommand = New OleDbCommand(sSQL, cn) Dim myReader As OleDbDataReader Try myReader = oCmd.ExecuteReader() Return myReader Catch e As OleDbException MsgBox(e.Message) cn.Close() End Try End Function
  10. Can I somehow get row before update (using ExecuteNonQuery) command changes it? I need to save previous value in log table
  11. Is there an easy solution to check if user was using the application within last n minutes? I need to create an "application inactivity timeout"
  12. I need to store an old and new record in audit table (Sybase)every time data changes. All changes are done using ExecuteNonQuery method passing SQL statement. So if I need to "DELETE TABLE1 WHERE Value='a'" I have to do "SELECT * FROM TABLE1 WHERE Value='a'" first and write result to an audit table. Is there an easier way to solve this problem?
  13. I need to send an e-mail from my program. The code is pretty simple: Dim from As String = "Management Projects@ubsw.com" Dim mailto As String = "vadim.naroditsky@ubsw.com" Dim subject As String = "New user request" Dim body As String = "Add new user..." System.Web.Mail.SmtpMail.SmtpServer = "newyorko.nyc.swissbank.com" System.Web.Mail.SmtpMail.Send(from, mailto, subject, body) I am getting the error: "Cannot access CDONTS.NewMail Object" I tried to add cdonts.dll to references with no effect. I am using Windows NT. What should I do?
  14. I have a tabpage "tabSummary" and I need to add another tabpage on the fly that should look exactly like this one. How to do it? I cannot do Dim tab as New tabSummary , since tabSummary is not a type, only Dim tab as tabPage. And if I write "tab = tabSummary" it will point to the same page. What should I write?
  15. I am not sure how to use it. There is no samples in help. I tried fm.Icon = System.Reflection.Assembly.GetManifestResourceStream("explorer.ico") but it gives an error. Can you show me an example,please?
  16. Thank you. That makes sense. One problem, though. When I want to add it back I have to use TabControl1.Controls.Add (t) and it adds the page to the end. I don't see any property that will allow me to show the tab at a specific place. DO you know how to do it?
  17. I need to change Form Icon during run-time. Where can I store icons? I don't want to keep them as separate files and ImageList stores them in Picture format that is incompatible with Icon format.
  18. But where I can store it while it is hidden? Or I have to recreate all controls on it every time I show it?
  19. How to make TabPage in TabControl disabled/invisible? TabConltrol1.TabPages(0).Visible=False and TabConltrol1.TabPages(0).Enabled=False have no effect on tab "ears"
  20. I need to give user a query design wizard. Is there such a component available or I have to write it from scratch?
  21. 1. I am creating a setup file that should setup several applications in different subdirectories of the same directory. All applications use the same DLL. Do I have to put the copy of DLL into each subfolder? By default Setup puts it into parent folder but then applications cannot find it. Can I specify where to look for it? 2. Is there a way in Setup program to put an entry into INI file during setup?
  22. vnarod

    I need help

    1. I tried Datareaders I got an error message saying that DataReader cannot be serialized so I cannot use them. Is there a way around it? 2. The problem I am haveing with adding webreference right now is that while I use "localhost" reference is added, but when I copy files to another webserver and use that server's name, instead of reference I get Open/Save Target/Cancel dialog box. It sees the file but as something to download not as reference. Why is that? 3. Does this webreference mean that in the event my server program will be moved to another server I will need to change client program and recompile it? Is there a way to specify server name in INI or registry? 4. I keep reading about SOAP in connection with all this. Do I need to do anything with it? Thank you
  23. I need to do a simple thing: 3-tier app using XML web extensions. Web Server should get data from database and send it to a client. I never did it before and I am stuck. On-line help doesn't make it easier. Can someone walk me through? I created a Web Service with methods such as <WebMethod> Public Function GetData(ByVal sSQL As String) As DataSet Dim oCmd As SqlCommand = New SqlCommand(sSQL, cn) Dim da As SqlDataAdapter = New SqlDataAdapter(oCmd) Dim ds As New DataSet() Try da.Fill(ds) Return ds Catch e As SqlException MsgBox(e.Message) cn.Close() End Try End Function What should I do next? How do I connect client to this service? How do I test it? Please, help
  24. I am trying to run setup from Bootstrapper sample but get an error "Invalid command arguments". Documentation doesn't mention any command line at all. What should I use? I need it in order to automatically install Framework when necessary. Help says that I only need to change INI file but it doesn't work.
  25. Is there any reason then to use Release configuration?
×
×
  • Create New...