|
Hi,
The name of the table might be interpreted as two separate words. Can you try out the syntax below?
string strSQL = "SELECT * FROM [Reunion-Table]";
I are Troll
|
|
|
|
|
|
Intellitrace wasn't designed to be used in an end-user debugging situation. It was designed for use during development and especially during testing. Your testers can create or recreate problems problems and send you the log files so that you can see the steps that were used to get to the problem as well as what the code was thinking as the steps were being followed.
|
|
|
|
|
|
|
hi their, i just wanna to know the major difference between abstract class and interface...
till now i knew like Abstract class will have connection of internally related method's declaration but in interface will have collection of unrelated methods... am i correct?
|
|
|
|
|
balajict wrote: i just wanna to know the major difference between abstract class and interface
It's not a "major difference", but a few subtle differences. There's an article[^] on CodeProject that highlights the differences.
Enjoy
I are Troll
|
|
|
|
|
HI THEIR,
i gone throw the article .its good but they were explained only about how to implement and syntax
differences n multiple inherit but wat i expert na why we need tat? almost both does the same thing
but why we need tat apart from the given explanation ....
|
|
|
|
|
Take a look at this article[^] by Microsoft.
It's time for a new signature.
|
|
|
|
|
balajict wrote: why we need tat?
I don't think that both have been thought up simultaneously with a distinct idea "let's use A in circumstance one and B in circumstance two". You got a sledgehammer and a warhammer, both have similar uses but different advantages and disadvantages in different situations.
I are Troll
|
|
|
|
|
subtle and instructive, I like it.
|
|
|
|
|
|
hi Jinal Desai,
thanks man.now i got clear idea about it thanks again.
|
|
|
|
|
I have created a VSTO Excel addin. It's deployment is really a headache.
I want to set VSTO 2.0 RunTime in prerequisite but I am using VS 2008 and it shows VSTO 3.0 Runtime in prerequisite list. I can not select that because that will use .NET 3.0 or above. My applicaiton is .NET framework 2.0 compatible and it requires VSTO 2.0 not 3.0 as a minimum requirement.
How to set VSTO runtime 2.0 as a minimum requirement ?
I want that If any dependency is not found on client PC then either it should be download from internet(in case of .NET framework) or it should be packaged with installation (in case of VSTO 2.0)
|
|
|
|
|
Are all your projects set to use and compiled to the 2.0 framework?
To verify, go to the menuitem "Project", and select "Properties". There's an "Application" tab, and it should state that it's using the 2.0 framework in the textbox labeled "Target Framework".
I are Troll
|
|
|
|
|
Yes my both projects(SetSecurity & Excel Addin) in soltion are targeting to Framework 2.0
My setup project is also showing dependence "Microsoft .NET Framework" with version 2.0.50727
|
|
|
|
|
VSTO 3 isn't supported on the 2.0 framework, I hoped that the installer would drop everything that would require a newer version of the framework.
Can you uninstall VSTO3 (to make sure there's no references at all), building[^] the setup using VS2005 & VSTO2?
I are Troll
|
|
|
|
|
unfortunately it is not getting uninstall. On uninstall it crashes and shows "Send \ Don't Send". Any VSTO run-time cleanup tool available ?
|
|
|
|
|
Hi
I want types of layout in .net
please help me
|
|
|
|
|
You will have to be more specific as different technologies provide different layouts.
If you are looking for WPF layouts, see here.
Silverlight, too, provides different panels for layouts.
|
|
|
|
|
LayoutKind[^]
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Hi there! I need some help with datagrid.
How to put a image\ico in the datagrid header column?
Thanks
|
|
|
|
|
One way you can do this is to use the CellsPainting event to draw the
bitmap for a particular header cell. Here is code that does this
assuming the bitmap is in an imagelist.
//this.images is an ImageList with your bitmaps
void dataGridView1_CellPainting(object sender,
DataGridViewCellPaintingEventArgs e)
{
if (e.ColumnIndex == 1 && e.RowIndex == -1)
{
e.PaintBackground(e.ClipBounds, false);
Point pt = e.CellBounds.Location;// where you want the bitmap
in the cell
int offset = (e.CellBounds.Width -
this.images.ImageSize.Width) / 2;
pt.X += offset;
pt.Y += 1;
this.images.Draw(e.Graphics, pt, 0);
e.Handled = true;
}
}
Jinal Desai
|
|
|
|
|
Thank you Jinal for the replay,
but that work for the DataGridView. I need to do that in a DataGrid, i have to use framework 1.1
Best regards,
|
|
|
|
|
I am confused; I am using VB2010, IBM.iSeries.DB2 on an as400 V5R4. I am trying to establish an OLEDB connection, and return the values from the selected table to a DataGridView. I had one of the admin’s make me file named GARBAGE, in the Rprtaccess catalog. In the past, I have been able to connect via access and an ODBC connection. My project is too big for access, and the SQL middleware we have is clunky and not user friendly. This is a program that will generate the SQL statements, specifically the WHERE: clause and populate the datagrid with the selected criteria. In essence I am making a user friendly striped down program, that has variables that are manipulated by the end user, and the rest, referenced tables and libraries are coded.
Imports System.Data.OleDb<br />
Imports System.Exception<br />
<br />
<br />
<br />
Public Class Form11<br />
<br />
Public Sub Form11_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
If Not String.IsNullOrEmpty("10.0.0.75\rprtaccess\garbage") Then<br />
<br />
Dim OleDbConn As New OleDbHandler<br />
Dim dgvOleDb1 As New Object<br />
Dim ds As DataSet = OleDbConn.GetDataFromOleDb("10.0.0.75\rprtaccess\")<br />
<br />
Dim OleCm As New OleDbCommand<br />
<br />
<br />
If ds IsNot Nothing Then<br />
<br />
Dim table As New DataTable<br />
table.Locale = System.Globalization.CultureInfo.InvariantCulture<br />
<br />
OleCm.CommandType = System.Data.CommandType.StoredProcedure<br />
OleCm.CommandText = "Select Garbage"<br />
Dim CM As Object = OleCm.CommandText<br />
<br />
<br />
Dim OleDA As New OleDbDataAdapter()<br />
ds = CM.SelectCommand.ExecuteReader<br />
<br />
<br />
<br />
dgvOleDb1 = table.Select<br />
<br />
dgvOleDb1.DataSource = DataGridViewEditMode.EditProgrammatically<br />
dgvOleDb1.DataSource = ds.Tables(0)<br />
End If<br />
End If<br />
End Sub<br />
<br />
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvOleDb1.CellContentClick<br />
<br />
End Sub<br />
Public Sub ShowOleDbException()<br />
Dim mySelectQuery As String = "SELECT column1 FROM table1"<br />
Dim myConnection As New OleDbConnection _<br />
("Provider=Microsoft.Jet.OLEDB.4.0;DataSource=")<br />
Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)<br />
<br />
Try<br />
myCommand.Connection.Open()<br />
Catch e As OleDbException<br />
Dim errorMessages As String<br />
Dim i As Integer<br />
<br />
For i = 0 To e.Errors.Count - 1<br />
errorMessages += "Index #" & i.ToString() & ControlChars.Cr _<br />
& "Message: " & e.Errors(i).Message & ControlChars.Cr _<br />
& "NativeError: " & e.Errors(i).NativeError & ControlChars.Cr _<br />
& "Source: " & e.Errors(i).Source & ControlChars.Cr _<br />
& "SQLState: " & e.Errors(i).SQLState & ControlChars.Cr<br />
Next i<br />
<br />
Dim log As System.Diagnostics.EventLog = New System.Diagnostics.EventLog()<br />
log.Source = "My Application"<br />
log.WriteEntry(errorMessages)<br />
Console.WriteLine("An exception occurred. Please contact your system administrator.")<br />
End Try<br />
End Sub<br />
<br />
End Class
#Region " Import Section"<br />
Imports System<br />
Imports System.Collections.Generic<br />
Imports System.Text<br />
Imports System.Data<br />
Imports System.Data.OleDb<br />
Imports System.Reflection<br />
Imports System.Runtime.InteropServices<br />
Imports Microsoft.Office.Interop<br />
<br />
#End Region<br />
<br />
<br />
<br />
Public Class OleDbHandler<br />
<br />
' Return data in dataset from OleDb. ' <br />
Public Function GetDataFromOleDb(ByVal a_sFilepath As String) As DataSet<br />
Dim ds As New DataSet()<br />
Dim oOleDbConnection As OleDbConnection<br />
Dim sConnString As String = _<br />
"Provider=IBMDA400.DataSource.1;" & _<br />
"Data source=10.0.0.75;" ' & _<br />
'"User Id=myUsername;" & _<br />
' "Password=myPassword"<br />
oOleDbConnection = New OleDb.OleDbConnection(sConnString)<br />
oOleDbConnection.Open()<br />
<br />
<br />
<br />
Try<br />
oOleDbConnection.Open()<br />
Catch ex As OleDbException<br />
Console.WriteLine(ex.Message)<br />
Catch ex As Exception<br />
Console.WriteLine(ex.Message)<br />
End Try<br />
<br />
' It Represents data table '<br />
Dim dt As New System.Data.DataTable()<br />
dt = oOleDbConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)<br />
If dt IsNot Nothing OrElse dt.Rows.Count > 0 Then<br />
For sheet_count As Integer = 0 To dt.Rows.Count - 1<br />
Try<br />
' Create Query to get Data from sheet. '<br />
Dim sheetname As String = dt.Rows(sheet_count)("table_name").ToString()<br />
Dim da As New OleDbDataAdapter("SELECT * FROM [" & sheetname & "]", sConnString)<br />
da.Fill(ds, sheetname)<br />
Catch ex As DataException<br />
Console.WriteLine(ex.Message)<br />
Catch ex As Exception<br />
Console.WriteLine(ex.Message)<br />
End Try<br />
Next<br />
End If<br />
oOleDbConnection.Close()<br />
Return ds<br />
End Function<br />
<br />
<br />
Private Function GetDataOleDb(ByVal a_dtData As System.Data.DataTable) As Object(,)<br />
Dim obj As Object(,) = New Object((a_dtData.Rows.Count + 1) - 1, a_dtData.Columns.Count - 1) {}<br />
<br />
Try<br />
For j As Integer = 0 To a_dtData.Columns.Count - 1<br />
obj(0, j) = a_dtData.Columns(j).Caption<br />
Next<br />
<br />
Dim dt As New DateTime()<br />
Dim sTmpStr As String = String.Empty<br />
<br />
For i As Integer = 1 To a_dtData.Rows.Count<br />
For j As Integer = 0 To a_dtData.Columns.Count - 1<br />
If a_dtData.Columns(j).DataType Is dt.[GetType]() Then<br />
If a_dtData.Rows(i - 1)(j) IsNot DBNull.Value Then<br />
DateTime.TryParse(a_dtData.Rows(i - 1)(j).ToString(), dt)<br />
obj(i, j) = dt.ToString("MM/dd/yy hh:mm tt")<br />
Else<br />
obj(i, j) = a_dtData.Rows(i - 1)(j)<br />
End If<br />
ElseIf a_dtData.Columns(j).DataType Is sTmpStr.[GetType]() Then<br />
If a_dtData.Rows(i - 1)(j) IsNot DBNull.Value Then<br />
sTmpStr = a_dtData.Rows(i - 1)(j).ToString().Replace(vbCr, "")<br />
obj(i, j) = sTmpStr<br />
Else<br />
obj(i, j) = a_dtData.Rows(i - 1)(j)<br />
End If<br />
Else<br />
obj(i, j) = a_dtData.Rows(i - 1)(j)<br />
End If<br />
<br />
Next<br />
Next<br />
Catch ex As Exception<br />
Console.WriteLine(ex.Message)<br />
End Try<br />
Return obj<br />
End Function<br />
<br />
End Class
|
|
|
|