Click here to Skip to main content
15,890,366 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: VBA (Excel) filter by date [modified] Pin
~Khatri Mitesh~11-Jun-08 0:57
~Khatri Mitesh~11-Jun-08 0:57 
GeneralRe: VBA (Excel) filter by date Pin
progDes11-Jun-08 1:06
progDes11-Jun-08 1:06 
Questionshowing animated waiting form Pin
Tom Deketelaere10-Jun-08 23:04
professionalTom Deketelaere10-Jun-08 23:04 
Questionhandling connection object exception Pin
vermaratan10-Jun-08 22:21
vermaratan10-Jun-08 22:21 
AnswerRe: handling connection object exception Pin
Colin Angus Mackay11-Jun-08 0:47
Colin Angus Mackay11-Jun-08 0:47 
GeneralRe: handling connection object exception Pin
vermaratan11-Jun-08 0:59
vermaratan11-Jun-08 0:59 
AnswerRe: handling connection object exception Pin
Ashfield11-Jun-08 3:17
Ashfield11-Jun-08 3:17 
QuestionIs there any field limitaion in Structure (VB.NET) Pin
Michael Sync10-Jun-08 21:10
Michael Sync10-Jun-08 21:10 
One of my friends is doing one VB.NET project. but she said that she always get this error "error: cannot obtain value".

The code is like that.

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim f As New Foo
Dim dd As DataSet = f.SQL1_SearchLotInfo(Nothing)
Console.WriteLine(dd.Tables.Count)
Console.WriteLine(dd.Tables(0).Rows.Count)
End Sub
End Class

Public Class Foo

Public Function SQL1_SearchLotInfo(ByVal a As dataLOTBOX1) As DataSet

Dim Table1 As DataTable
Table1 = New DataTable("Customers")
'creating a table named Customers
Dim Row1, Row2, Row3 As DataRow
'declaring three rows for the table
Try
Dim Name As DataColumn = New DataColumn("Name")
'declaring a column named Name
Name.DataType = System.Type.GetType("System.String")
'setting the datatype for the column
Table1.Columns.Add(Name)
'adding the column to table
Dim Product As DataColumn = New DataColumn("Product")
Product.DataType = System.Type.GetType("System.String")
Table1.Columns.Add(Product)
Dim Location As DataColumn = New DataColumn("Location")
Location.DataType = System.Type.GetType("System.String")
Table1.Columns.Add(Location)

Row1 = Table1.NewRow()
'declaring a new row
Row1.Item("Name") = "Reddy"
'filling the row with values. Item property is used to set the field value.
Row1.Item("Product") = "Notebook"
'filling the row with values. adding a product
Row1.Item("Location") = "Sydney"
'filling the row with values. adding a location
Table1.Rows.Add(Row1)
'adding the completed row to the table
Row2 = Table1.NewRow()
Row2.Item("Name") = "Bella"
Row2.Item("Product") = "Desktop"
Row2.Item("Location") = "Adelaide"
Table1.Rows.Add(Row2)
Row3 = Table1.NewRow()
Row3.Item("Name") = "Adam"
Row3.Item("Product") = "PDA"
Row3.Item("Location") = "Brisbane"
Table1.Rows.Add(Row3)
Catch
End Try

Dim ds As New DataSet()
ds = New DataSet()
'creating a dataset
ds.Tables.Add(Table1)
Return ds
End Function
End Class

Public Structure dataLOTBOX1
Dim TDATE As Date
Dim BOX As String
Dim UTACLOTID As String
Dim RLOTID As String
Dim CUSTLOTID As String
Dim PARTID As String
Dim SUPPLIERID As String
Dim INPART As String
Dim OUTPART As String
Dim DATECODE As String
Dim STAGE As String
Dim CUSTDEVICE As String
Dim CUSTOMERPACKAGE As String
Dim PACKAGESIZE As String
Dim PINCOUNT As Integer
Dim TOTALQTY As Integer
Dim TB1 As Integer
Dim TB2 As Integer
Dim TB3 As Integer
Dim TB4 As Integer
Dim TB5 As Integer
Dim TB6 As Integer
Dim TB7 As Integer
Dim TB8 As Integer
Dim TB9 As Integer
Dim TB10 As Integer
Dim TB11 As Integer
Dim TB12 As Integer
Dim TB13 As Integer
Dim TB14 As Integer
Dim TB15 As Integer
Dim TB16 As Integer
Dim TB17 As Integer
Dim TB18 As Integer
Dim TB19 As Integer
Dim TB20 As Integer
Dim AB As Integer
Dim EB1 As Integer
Dim EB2 As Integer
Dim EB3 As Integer
Dim EB4 As Integer
Dim EB5 As Integer
Dim EB6 As Integer
Dim FB As Integer
Dim DEFAULTFLOW_LOTBOX As String
Dim NEWBOX As String
Dim FINALFLOW As String
Dim ITEM As String
Dim STATUS As String
Dim OLDSTATUS As String
Dim REMARK As String
Dim TRANID As String
Dim INAME As String
Dim IEMPLOYEE As String
Dim IDATE As Date
Dim CNAME As String
Dim CEMPLOYEE As String
Dim CDATEE As Date
Dim ANAME As String
Dim ADATE As Date
Dim WOFFICER As String
End Class

The problem is that it's not possible to include more than 59 fields or 60 field in one structure. Due to some many reason, she said that she need to include more 60 fields in that structure. So, I suggested her to use a class with "public shared" instead of structure. but I wanna know why we can't have more than 59 fields or 60 field in one structure?

thanks in advance.

Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)


AnswerRe: Is there any field limitaion in Structure (VB.NET) Pin
Chinners10-Jun-08 22:41
Chinners10-Jun-08 22:41 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Michael Sync10-Jun-08 23:23
Michael Sync10-Jun-08 23:23 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Chinners10-Jun-08 23:56
Chinners10-Jun-08 23:56 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Michael Sync11-Jun-08 4:52
Michael Sync11-Jun-08 4:52 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Chinners11-Jun-08 5:31
Chinners11-Jun-08 5:31 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Michael Sync11-Jun-08 15:57
Michael Sync11-Jun-08 15:57 
AnswerRe: Is there any field limitaion in Structure (VB.NET) Pin
Colin Angus Mackay10-Jun-08 23:03
Colin Angus Mackay10-Jun-08 23:03 
AnswerRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Colin Angus Mackay10-Jun-08 23:05
Colin Angus Mackay10-Jun-08 23:05 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Michael Sync10-Jun-08 23:21
Michael Sync10-Jun-08 23:21 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Colin Angus Mackay11-Jun-08 0:43
Colin Angus Mackay11-Jun-08 0:43 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Michael Sync11-Jun-08 4:53
Michael Sync11-Jun-08 4:53 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Colin Angus Mackay11-Jun-08 13:41
Colin Angus Mackay11-Jun-08 13:41 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Michael Sync11-Jun-08 15:54
Michael Sync11-Jun-08 15:54 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Colin Angus Mackay11-Jun-08 21:12
Colin Angus Mackay11-Jun-08 21:12 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Michael Sync11-Jun-08 21:22
Michael Sync11-Jun-08 21:22 
QuestionReflection issue Pin
cstrader23210-Jun-08 13:09
cstrader23210-Jun-08 13:09 
QuestionGetting DataTable to clean XML to send over a socket Pin
Noctris10-Jun-08 12:18
Noctris10-Jun-08 12:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.