Jump to content
Xtreme .Net Talk

hog

Avatar/Signature
  • Posts

    1011
  • Joined

  • Last visited

Everything posted by hog

  1. I create a single dataset with the an SQL statement that returns all the required records from multiple tables. I think that was is easier than the way you are doing it
  2. beat me to it Madz.... yes you should use the CR that is shipped with VS. I'm using this with no problems.
  3. after you have created your dataset pass it to the form that will display your report and set the forms private dataset variable to the dataset being passed to the form Private m_dsReportSource As System.Data.DataSet Public Sub New(ByVal dsReportSource As System.Data.DataSet) MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call ' set the forms dataset variable to passed dataset m_dsReportSource = dsReportSource End Sub then setup your report as follows.... Private Sub CrystalReportViewer1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load myReport = New repWhatEver() myReport.SetDataSource(m_dsReportSource) Me.CrystalReportViewer1.ReportSource = myReport End Sub
  4. m_dsWhatEver.Tables("tblWhatEver").Rows.Count
  5. Strange.... Up til now I had developed numerous end user apps with Access97 & AccessXP mainly using VBA within. Since getting VS .NET Pro I have found it a dream to write applications using VB.NET and ADO.NET with a raw Access backend database. When things progress I'll move onto MSDE, but for now Access will do. The current app I'm writing, a maintenance servicing contracts system has been no harder to create using VB .NET than using Access VBA, in fact far more versatile!
  6. well it seems to be working now... I shall be speaking to the hosting bods to find out why it went down, as this was the second weekend in a row this has happend! I hope it's not a failed uptime provider I'm dealing with!! If so I'll have to move hosting company.........or figure out how to host it myself from home......mmmm now there is something I know jack about!
  7. I'm a systems developer using VB, Access VBA and now VB.NET. Have programmed in (years agos PASCAL, C, C++, Assembler). Started life programming on the Sinclair ZX81, then onto commodore64 then into databases on PC for work. My programming experience has grown steadily with my work I do for my employer as well as fun stuff at home.
  8. Whooohooo my first customer :-) Cheere Mutant... There seems to be a problem with the hosting server as I am unable to connect to my own site :-( Please be patient and keep trying :-)
  9. OK it's out there... for those who are interested....visit my site at http://www.elpuerco.co.uk where you can download my free games. Space.exe as the site says should be classed as a demo, shuffle on the other hand is a complete game....:)
  10. hog

    icons

    Well blow me! The VB icon editor IS Pretty cool...thanks guys! NicoVB, thanks but I'll stick with the VB one.
  11. OK....I HAVE FIXED IT :-) Can anyone explain why this error plagued me until I manually moved all code to do with the dataset, oledbdataadapter and connection into the beginning of the InializeComponent procedure? This means I have modified what the windows designer did to fix the problem? All the other forms work fine with the windows designer placed code, so why would this form be different? Have I as APaule says possibly discovered an MS bug??
  12. OK, you have confirmed for me that this is the InializeComponent() procedure, but the cursor stays at the line that calls it. It does not move into the block of code you show above. This is what I meant by not being able to see where exactly it goes wrong :-(
  13. hog

    icons

    divil, could you point me in the right direction please as although I have a freebie program I'd like to try out what VB has to offer. I've tried searcjing for icon, shortcut etc but drawn a blank so far.
  14. OK thanks for this, however I did not hold out much hope as the selectcommandtext is the same as the other forms. But at this stage I would try sticking my you know what in a jam jar full of angry wasps if I thought it would help..... So I replace all entries of type with [type] to get the same result. The code stops at my breakpoint at InitializeComponent. I F11 the line executes but does not move past the cursor point at InitializeComponent. I get the error again ' selectcommandtext not initialized before call to .fill'. I click OK the everything works ok?? I have double checked and the oledataadapter on the form has the selectcommand text set correctly. I have looked in the windows desiger generated code and the entry is there? As the error is happening inside a procedure called InializeComponent that was put there by the IDE I cannot see what code is inside this procedure to see where it is going wrong? My bloody brain is well and trully hurting now!
  15. Nerseus, I have tried this already. I have put breakpoints everywhere and the code does not stop. However I narrowed it down to the this bit: Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub If I put a break point at MyBase.New() that line works. The next line InitializeComponent() gets called and the churns away for a bit then the error is displayed. The error trap I'm using displays it as being in ResetDataset. The selectcommandtext is blank, but further down in the windows designer code is this: ' 'OleDbSelectCommand1 ' Me.OleDbSelectCommand1.CommandText = "SELECT assetid, supplierid, model, type, '[' + type + ']' + ' ' + model + ' ' + s" & _ "erial AS description FROM tblAsset ORDER BY type" Me.OleDbSelectCommand1.Connection = Me.OleDbConnAssets Once I click OK on my error handler form the form opening is displayed and everything works fine. I cannot get the step through code to step into InitializeComponent() so I can see what is happening.
  16. hog

    icons

    Found one, and icon created and installed....ta :-)
  17. hog

    Compatibility

    cheers ears :-)
  18. hog

    icons

    Something I've never done before is create an icon fo VB? Is there a package that comes with VB Pro or do you need to buy a third party product?
  19. Is any app developed using VB .NET compatible only on Windows2000 and above? Or will they and the .NET Framework work on Win95, Win98, ME etc or even Macs?
  20. Now you rerally are misunderstanding me! This is frustrating as it would appear that unless I supply the whole application how can I make you understand? The reson for the blnRefreshingForm test is there to stop all the controls .changed events firing etc when the form is having it's data refreshed after a user selects a record. The other forms show this as false when InitializeComponent is called. I'm not depending anything? However if I have identical methods working all the way through my application that all work correctly then why would I ignore that fact that this one does not work? The fact you think I would let this application in this state out to the users shows you don't follow me. Also I have already accepted that the use of the Update method was not required and understand why. This does not mean that every other piece of my applications code is in question, have you never made a mistake like this? Lastly, and I'm not having a pop at anyone whatsoever as this is all meant to a friendly helpful site, I will explain in the simplest terms I can. In form design: dataconnection set to a valid data source dataadapter set to valid selectcommand text dataset setup correctly At runtime: dataconnection set to users default dataadapter selectcommand text set to require value dataset is filled The error I get is when the form is being initailised. It says the selectcommand text is not set. But as the selectcommand text is setup at design time how can this be? The selectcommand text only gets changed when a user selects a filter. Lastly lasty :-) this method works perfectly well on every other form in the application and does so on this form if I ignore the inialisation error.
  21. DOOOOOOOHHHH! yes I accept that the update line is a complete waste of time. However when the form loads I get the error re selectcommand not set, even thought it is hard coded into the form as a starting point. Thereafter the code works a treat!
  22. Sorry folkes we seem to be going around in circles here.
  23. More food for thought.... OK so I get this error when the form opens. When I click OK to acknowledge the error and allow the app to continue the form acts exactly as the others. I can use the radio buttons to filter the combobox and the call to ResetDataset works. If I add additional records to the database then the call to ResetDataset works perfect (just as in all the other forms). Therefore there is something going on in the Windows Designer code that is causing the grief!
  24. OK perhaps I should explain further as reading my past posts this bit is not mentioned...oops! There is a combobox on the form that lists all items live and archived. The user can choose to see live only or live and archived by using the radio buttons. There is also the need to refresh the data in the combobox to read from the database again as there is all probability that another user may have archived or appended new items to the list. Therefore....the update method reads the database again to ensure it has an up to date listing of items in the database. So from this perspective surely the update method is record?
  25. ??? but dudes I'm on £24K and am not even in the private sector! I have been programming now for 14 yrs but only full time in the last 3-4 yrs. this seems not of this world?
×
×
  • Create New...