Jump to content
Xtreme .Net Talk

techmanbd

Avatar/Signature
  • Posts

    405
  • Joined

  • Last visited

Everything posted by techmanbd

  1. Yes, the machine has excel and I went and did the run and it comes up
  2. Ok, what is happening is that on the computer I am writing the code on, when I run it it works fine. The excel file opens. BUT when I put it on another computer I get the error donw at the bottom. Here is my code Dim strExFile As String = strPath & "\filename.xls" Try exSheet = exApp.Workbooks.Open(strExFile).Worksheets(strWS) Catch ex As Exception MessageBox.Show("Couldn't open or find -" & strExFile & ". Error message = " & Err.Description & _ ". Error number = " & Err.Number) exApp.Quit() exSheet = Nothing exApp = Nothing GC.Collect() Exit Sub End Try [code] And I get this error "Couldn't open or find -C:\Program Files\companyname\file\filename.xls. Error message = Object refernce not set to an instance of an object. Error Number = 91 "
  3. OK I found my problem. I used the odbc connection, but have to hard code it into the program, Can't use the TOOL / CONNECT TO DATABASE
  4. Ok here is my situation. I have an AS400 database I am trying to connect to. If I use in "TOOLS" - CONNECT TO DATABASE it shows for provider IBM AS400 OLE DB Provider. Then I goto connection and for my DATA SOURCE I put in \\nameofdatabase\nameoffilearea and then insert the username for this file and password and I get this error message when I test connection "Test connection failed becauase of an error in initializing provider. Unspecified error" Any ideas what this means and a resolution? I have a 2nd one. I tried a different connection which I red from redbook. I used for provider Microsoft OLE DB Prvider for ODBC Drivers. then on the connection I use connection string which when I build I get the built string to the database I am using. Then I test connection and it is successful. t hen I click ok and get the following message "Unable to connect to database, It is only possible to connect to SQL Server Desktop Engine databases and Microsoft Access databses with this version of Visual Studio" Any ideas what this one means and a resolution? Thanks
  5. basically, they said they were not able to create the account for me to access the library. They could not figure out how. So I have to give them my info for them to do it
  6. Thanks SDE, yes this helps, I am familiar with what logical and physical. I have taken classes in Oracle and MS Server 7. And I see if I use TOOLS, "CONNECT TO DATABASE" I have the optin of using the provide 'IBM AS400 OLE DB Provider" and slowness of connection is no problem, this comapmnay has never used the DB for testing so they have so much room. But I do have another question. They said they could not give me permissions to access say a certain Library and Files so I can build my own tables, well libraries, and files. So That I can manage the certain ones I will be using. I know that MS Server the admins let me at a different comapany I worked for. IS this true? Sometimes talking to the IT guys they don't seem to knowledgable on databases. Unfortunately, before I came on board they were not much and data storage
  7. OK, How much different is having an AS400 database compared to a MS SQL Server or Oracle. Why I am asking is because I am writing a test program that will put test data onto the database. I was talking to the IT manager to get tables made, and he kept saying not tables they are data files. and that they would have to write a program on the as400 to get my info from my program because he doesn't see how my program can connect to the database. he also wants to combine the 5 tables i have to 1. ARRRRGGHHHH anyways. just wanted to know a little more about the as400. never worked with it only SQL Server and MS Access.
  8. What I do it have to plan out first, because in my line of work, which is automated testing, I have a prouduct I need to control and get results. So I have to plan out what the controls I need then what the results are that I get back. Then I have to think about the process and then start coding. But lik Hog says, there is only so much you can plan. I find that alot of code I do, I end up doing it as I go along.
  9. Take out the counters = counters + 1. The FOR NEXT LOOP already does the count up for you
  10. Earlier I wrote that I use Access at work, well I can change my answer now. They have an IBM AS400. Neevr used it before but hey finally gave me space and my own data folder on it. I will start using it this week. Real cool because I get to learn something new.
  11. Yes, that is what I mean
  12. in the actual table are any of the fields set as a number? if they are then you don't need the ' ' around it. you have this 'txtUID.Text' so part of the string looks like this ........ , '3', ................ should be like this ....... , 3, ....
  13. try first_name last_name but got to say that using spaces in the field names in not proper to do. it definetely should not be done. for the obvious reason
  14. This is what I use. It allows you to puyt numbers in the text box and allows the use of teh backspace Private Sub txtNewPSI_Keypress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtNewPSI.KeyPress 'Only allows numbers to be entered into text box If ((Asc(e.KeyChar) > 57) Or (Asc(e.KeyChar) < 48)) Then If (Asc(e.KeyChar) = 8) Then e.Handled = False Else e.Handled = True Beep() End If End If End Sub
  15. http://www.xtremedotnettalk.com/showthread.php?s=&threadid=78374&highlight=com+port read this thread
  16. Ok I have a setup application in my main application. I ran it and it does fine except having one problem. It doesn't update the exe file. I install the updated setup on my other computer and the exe file never updates to the newer build. Any thoughts? Thanks
  17. I used the property of the button "Backgroundimage" and added an image and it comes up on my button. And in a program that I have I use a "Stop Sign" icon and put that under the property "Image" of the button
  18. I have a button that runs a test. at the end of the test I want to clear any button event that may have been pressed during the test. What would I do that at the end of the test to tell button1 not to execute. I gues basically clear the event. Thanks,
  19. should show your code so we can see anything you need to add or troubleshoot
  20. On the forms property there is an "AcceptButton". set that to the button you want to use to show a form in the sub you are going to show dim form as new frmMain form.show to hide: frmMain.hide
  21. Private Sub richtextbox_keypress(ByVal sender As System.Object, ByVal e As KeyPressEventArgs) Handles RichTextBox1.KeyPress me.richtextbox1.forecolor = color.'whatevercolor' End Sub
  22. That is way cool, thanks. I was going to do it a very long and hard way
  23. I am not sure what you want, but you can type in the combobox then have this next code. When you hit the enter key after you type something it will put in the list of the combobox Private Sub combo_keypress(ByVal sender As System.Object, ByVal e As KeyPressEventArgs) Handles ComboBox1.KeyPress If Asc(e.KeyChar) = 13 Then Me.ComboBox1.Items.Add(Me.ComboBox1.Text) End If End Sub as for the list I don't see how you can make it a drop down.
  24. try a combobox
  25. What I have is an image of a membrane contoller. I then put a button on the image where one would push the button in real life. I don't want the user to see the button. But when they click on the certain region of the image I want it to do something. I treid sending the button to the back of image, that doens't work, I also made it invisible, but that doesn't work. Anyone have any ideas? Thanks
×
×
  • Create New...