Jump to content
Xtreme .Net Talk

aletheia

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by aletheia

  1. Is it impossible? :confused:
  2. How can I get the TEXT of a DataGrid headers? Thank you :)
  3. It doesn't work anyway... But I don't want to annoy you more, you already helped me a lot. Thank u :)
  4. I have Windows NT with service pack 6. On Windows 2000 the method .Quit() works. Do you have Windows 2000? Is it possible that it doesn't work because of the operating system? Thanx
  5. You're right, many Excel processes are running... that's why. But, that's mean that xlObj.Quit() doesn't work? Because it doesn't close the application...
  6. HELP... I add the reference Excel 9.0 library object, and the errors disappear. But after clicking the button: 1) the file .xls is locked and I just can open it as "read only" 2) anyway the file is EMPTY... If I try to close everything, it remains "read only" and empty. But it doesn't give me any errors... what's wrong with it?
  7. THANK YOU VERY MUCH!!! But... It gives me error on "Excel.Application" and "Excel.Workbook" types. Which namespace should I import?
  8. Nobody knows...? :(
  9. Jon, this sub works fine: Private Sub btnVai_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVai.Click Try ds.Clear() ds.Dispose() ds = New DataSet() DataGrid1.DataSource = Nothing DataGrid1.DataMember = Nothing DataGrid1.SetDataBinding(Nothing, "") cn.ConnectionString = cnString cn.Open() If txtQuery.SelectedText = "" Then da.SelectCommand.CommandText = txtQuery.Text Else da.SelectCommand.CommandText = txtQuery.SelectedText End If da.Fill(ds, "Temp") DataGrid1.DataSource = ds DataGrid1.DataMember = "Temp" lblRighe.Text = ds.Tables("Temp").Rows.Count & " righe selezionate" Catch ex As OleDb.OleDbException MsgBox("Istruzione SQL non valida", MsgBoxStyle.Critical, "Errore di sintassi SQL") Finally cn.Close() cn.Dispose() End Try End Sub
  10. How can I export data from a Datagrid to an Excel file? I know how to do in ASP.NET, but I want to do the same operation in a WindowsForm application. Thanks in advance
  11. Thanx to everyone, now it works. ;)
  12. Pleaseee... help me... nobody seems to know... Call Microsoft... call someone.... :eek:
  13. No, no, it doesn't work anyway!!! Here is my sub: what's wrong??? Private Sub btnVai_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVai.Click Try ds.Clear() ds.Dispose() DataGrid1.DataSource = Nothing cn.ConnectionString = cnString cn.Open() If txtQuery.SelectedText = "" Then da.SelectCommand.CommandText = txtQuery.Text Else da.SelectCommand.CommandText = txtQuery.SelectedText End If da.Fill(ds, "Temp") DataGrid1.DataSource = ds DataGrid1.DataMember = "Temp" lblRighe.Text = ds.Tables("Temp").Rows.Count & " righe selezionate" Catch ex As OleDb.OleDbException MsgBox("Istruzione SQL non valida", MsgBoxStyle.Critical, "Errore di sintassi SQL") Finally cn.Close() cn.Dispose() End Try End Sub
  14. Nodody use DataGrid here?
  15. Hi everyone, I have an easy question (but I'm going crazy!): I do a query and I put data in a DataGrid; if I make another query on another table (WITH DIFFERENT COLUMNS NAMES) it shows me the columns of the 1st query, too! How can I clear the STRUCTURE of the DataGrid? Thank you very much :)
×
×
  • Create New...