Jump to content
Xtreme .Net Talk

hog

Avatar/Signature
  • Posts

    1011
  • Joined

  • Last visited

Everything posted by hog

  1. Seeing as I'm having grief with the excel way, is it possible to load a text file directly into a dataset? Can't find anything as yet in the help:(
  2. How do I attach a file on this posting? If I send your the xls file you will see what I mean:)
  3. Yep, very similar to this: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim DS As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter Dim MyConnection As System.Data.OleDb.OleDbConnection MyConnection = New System.Data.OleDb.OleDbConnection( _ "provider=Microsoft.Jet.OLEDB.4.0; " & _ "data source=C:\returns.XLS; " & _ "Extended Properties=Excel 8.0;") ' Select the data from Sheet1 of the workbook. MyCommand = New System.Data.OleDb.OleDbDataAdapter( _ "select * from [Returns$]", MyConnection) DS = New System.Data.DataSet Try MyCommand.Fill(DS) Catch ex As Exception MessageBox.Show(ex.Message) End Try MyConnection.Close() End Sub if I create a brand new xls file from Excel 2002 the code works ok. If I get the export xls file from the corporate system that opens ok in excel 2002 the code fails. If I save the corporate xls file as stated above it works. Question is what is so different about the corp xls file that when I open it make no changes and click save I get 'yadda.xls may contain features that are not compatible with text (tab delimited). Do you want to keep the workbook in this format.'
  4. Thnx DS, I'll keep your method as a backup but have discovered this: We have a corporate system that exports data to Excel. Excel opena automatically with the data displayed. If you close Excel no propmts are given. If I run my ealier code I get this error: 'yadda.xls may contain features that are not compatible with text (tab delimited). Do you want to keep the workbook in this format.' If I say yes I get the above error. If I say no I am prompted for a file name which I supply then the code above works a treat. What I can't suss is why?
  5. Mmm If I use this per the VS example: MyConnection = New System.Data.OleDb.OleDbConnection( _ "provider=Microsoft.Jet.OLEDB.4.0; " & _ "data source=C:\returns.XLS; " & _ "Extended Properties=Excel 8.0;") I get an error saying the table is in an unexpected format. Any ideas??
  6. Err yep yep you can:) simply enter 'reading excel into dataset' in the VS 2003 help and an example appears :):)
  7. Is it possible to import an Excel worksheet into a oledb dataset? I do not need to manipulate Excel at all I just need to get the data out of the .xls file into my app:confused:
  8. My son's mates has linux installed on his Xbox, USB KB and uses a GUI interface, upgraded the HDD, saves movies, games etc on it so I presume he may well be programming on it too
  9. I think this has cropped up before on the forum and the result (i think) was that no it wasn't possible
  10. I use this approach: Public Sub EnableButtons(ByVal frmCaller As Form, ByVal blnEnable as Boolean ) frmCaller.cmdNew.Visible = blnEnable frmCaller.cmdSave.Visible = blnEnable frmCaller.cmdSave.Enabled = blnEnable frmCaller.cmdDelete.Visible = blnEnable frmCaller.cmdModify.Visible = blnEnable frmCaller.cmdModify.Enabled = blnEnable frmCaller.cmdCancel.Visible = blnEnable End Sub This way you only need one proc
  11. :) ta....
  12. Subscription? No DVD drive? Yes DVD Burner? no 2 DVD burners?.....your havin' a laugh ain't ya:):)
  13. Could someone explain if there is any performance advantages between the two declaration snippets below or is it just a .exe file size issue? Dim intX as Int32 Dim intY as Int32 Dim intZ as Int32 Dim intX, intY, intZ as Int32
  14. Bizzarre? I get this on my lapop and got the same result as Mutant, with 2002 & 2003. However when I installed 2003 on a desktop PC it connect to the site and performed the search online then reported no updates while still connected to the web page.
  15. Feed back from Microsoft which may be helpful to other on 2003 that may find themselves in the same boat that I did:)
  16. Wyrd, I gave my resume a while ago but for you here it is again:) I'm 39, left school with absolutely nothing, got a apprenticeship in sheet metal working when I left school at 16. Gave that up after two weeks to become a delivery mans assistant. Gave that up to bottle paints for the motor industry. Took a year out dossing until my parents kicked my arse and so got a six week temp contract humping parcels into lorries. That was 20 years ago and I' still here:) I have worked my way up as I found a flare for programming which started in 1985 on the ZX81 then onto the Commadore64 writing silly graphics programs for my son. My employer realised my hunger to learn programming and now I have my own office, laptop supplied by work, am on £25K and get to do my hobby all day.....programming:):) Yes I do know I landed on my feet and I do know that there are plenty of programmers out there earning more than me, but I'm happy doing what I do, on a reasonably good salary and a reasonably secure job. I always think back to my teachers that said I was a waste of space and think yeah......look at me now arseholes:)
  17. okey dokey....installing away thnx:)
  18. It's a single CD recovery disk which puts everything back to as it supposedly was when it left the supplier. I then had to install VS 2003 and all my copy all my backup from my firewire drive, hence the time:( It's flying now though...thank God:)
  19. I now have a fully operation setup of VS 2003 but have not installed the MSDN which comes on three disks. Question is, should I install it or not....like is it worth it?
  20. Aha...four hours later and..........Yahooo the works a dream:) All I need do is install the work specific software tomorrow and hopefully all will remain well. Nice and fast, smooth and on the test with the backspace key only 1% rather than 100%:):) I thought these suppliers were supposed to send their goods out pre-optimiszed?
  21. hog

    TextChanged Event

    Mmm correct me if I'm wrong but is it ok to call a textbox textchanged event manually? If so I have just sorted it:):)
  22. I have code in a textboxes textchanged event which obviously fires when the user changes the text in the textbox. Question is if I change the textboxes text from code elsewhere during runtime, why doesn't the textchanged event fire? Is there a way to force it to fire?
  23. Me thinks I'm gonna wipe the damn thing and reinstall the whole OS and everything:(
  24. Well I would hope so I the laptop was only bought last week:)
  25. OK.....:( groan still no joy. I've now logged this with the laptop supplier as it works fine on the other PC and laptops but not mine even after a fresh install. It is so slow I fall asleep just waiting for it to do anything:(
×
×
  • Create New...