Jump to content
Xtreme .Net Talk

CookieMonster24

Avatar/Signature
  • Posts

    45
  • Joined

  • Last visited

CookieMonster24's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Maybe this is very simple, but i'm not seeing it. I want to create a help button, so that when pressed, it will display a new form with a manual in html format. how do i go about displaying the web page? I've created the web page. Now i want to be able to display it on the form.
  2. during installation the InstallState file appears. However, when i try to uninstall, the file is not removed. is there a solution to this?
  3. If i wanted to hold user information, connection string, etc, which would i want to use, an XML file or the registry keys? is there one advantage over the other?
  4. Did you ever solve this? i get the same response when i try to refresh the data in the database and then do a refresh on the crystalviewer.
  5. I want to update my database, but i'm having problems. it won't update the column i want updated. maybe someone can help me. i have: Try cn = New OleDbConnection(connString) Dim DSAdapter As New OleDbDataAdapter DSAdapter.SelectCommand = New OleDbCommand("Select * from finalAgg", cn) Dim custCB As OleDbCommandBuilder = New OleDbCommandBuilder(DSAdapter) DSAdapter.Fill(ds) KDt = ds.Tables.Item("Table") Dim dr As DataRow 'i want to change every row for this particular column. will not be aa for all, but can vary. using 'aa' as an example For Each dr In KDt.Rows dr.Item(7) = "'AA'" dr.AcceptChanges() Next KDt.AcceptChanges() DSAdapter.Update(KDt) cn.Close() Catch ex As Exception MsgBox(ex.ToString) End Try
  6. is there an easy way to take my data that i've selected from my datatable and insert it into another table in the database without having the do an insert statement for every row(i.e. cmd.commandtext = "insert into....")?
  7. it still doesn't read it. it's not filling my dataset
  8. i'm trying to read my xml file into my dataset. on my report, as a source i i've added my dataset (ClientStats). i select the fields i want but nothing appears. only the heading. this is what i currently have to fill the dataset. am i doing something wrong? on load --- Dim crReportDocument As New CrystalReport4 Dim dsXMLDataset As New ClientStats Dim strFilePath As String strFilePath = "client1.xml" dsXMLDataset.ReadXml(strFilePath) crReportDocument.SetDataSource(dsXMLDataset) CrystalReportViewer1.ReportSource = crReportDocument
  9. I'm having problems sorting my dataview. If anyone could help that would be great. here is what i have (dt is my datatable) Dim dv As New DataView(dt, "", "", DataViewRowState.CurrentRows) dv.Sort = "ClientID" PrintTable(dv.table, "DataTable") ' using this to test the sort 'then i would like to replace my current datatable with what i just sorted i've also tried just sorting like this dt.defaultview.sort = "ClientID" but that still doesn't work. Private Sub PrintTable(ByVal t As DataTable, ByVal label As String) ' This function prints values in the table or DataView. Console.WriteLine("\n" + label) Dim row As DataRow Dim c As DataColumn For Each row In t.Rows For Each c In t.Columns Console.Write("\t{0}", row©) Next c System.Console.WriteLine("") Next row Console.WriteLine() End Sub Any ideas where i am going wrong?
  10. Thanks! your first suggestion worked. exactly what i was looking for
  11. well....that kinda works. i can start my thread, but would i need to join or somehow stop the thread. when i save there is no infinite loop, and if i use a join, it still is slow. if i don't use join, there is no slow down. this is what i currently have. If result = DialogResult.Yes Then confirmDialog.disableTimer() confirmDialog.Dispose() 'saveProc() saveThread = New System.Threading.Thread(AddressOf saveProc) saveThread.IsBackground = True saveThread.Start() saveThread.Join() saveThread = Nothing else..... not sure if this right. i've never used threads before.
  12. i've never used a thread before, but i was told that i needed to use a thread because my form was taking to long to close. what i did works; however, when i purposely input incorrect data, i get an error msg of An unhandled exception of type 'System.Threading.ThreadInterruptedException' occurred in system.windows.forms.dll Additional information: Thread has been interrupted from a waiting state. this is what i currently have is Dim saveThread As System.Threading.Thread saveThread = New System.Threading.Thread(AddressOf saveProc) public sub saveData() .......... result = confirmDialog.ShowDialog(Me) If result = DialogResult.Yes Then saveThread.IsBackground = True saveThread.Start() confirmDialog.disableTimer() confirmDialog.Dispose() 'not sure if these two lines are correct saveThread.Interrupt() saveThread = Nothing ElseIf result = DialogResult.No Then my problem is that when i go to saveProc, it'll work fine unless i come across an error. if i have an error, i set up an error message box in the form of a new form and then showdialog. however, when i try to do this, i get the error message stated above. how do i fix this? since my saveProc does not have an infinite loop, do i still need to stop the thread? if i take out the interrupt then it works fine, but is that correct?
  13. i've tried that, doesn't work. what currently happens is that i'll press the button, part of the form will disappear and i'll still get a bit showing, it'll do the save, and when that's completed the form will close completely. all i want to do is to just get rid of the form and put an hourglass up fairly quick, but the saving the data is slowing things down. it's like i have to save the data before the form can be closed, even though i have made the call to close the form. why is this happening???
  14. There's quite a bit of code to run if the yes button has been pressed. i also set something up like this: result = formToOpen.showDialog(Me) If result = DialogResult.Yes Then yesEntered = True 'startTimer() ElseIf result = DialogResult.No Then 'startTimer() end if if yesEntered = true then ...... end if i thought, perhaps that would make a difference, but it doesn't.
  15. When i create a form, i call the form using showdialog. in the form i have a few buttons, yes, no and cancel. if i select yes, the form has a delay in trying to close. e.g. i have result = formToOpen.showdialog(me) if result = dialogresult.yes then 'i do whatever is needed to save data elseif result = dialogresult.no then 'i do nothing and close the form end if formToOpen.dispose is there any way to speed up the closing of the form when Yes is selected? i have several functions being called in the first if statement, but i would hope that the form could be closed and then the functions ran. is this possible?
×
×
  • Create New...