<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>VBForums - Visual Basic .NET</title>
		<link>https://www.vbforums.com/</link>
		<description>Drop in here to discuss all editions and versions of Visual Basic .NET (2002 or later) or anything to do with VB .NET programming.</description>
		<language>en</language>
		<lastBuildDate>Sun, 19 Jul 2026 08:29:03 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>https://www.vbforums.com/images/misc/rss.png</url>
			<title>VBForums - Visual Basic .NET</title>
			<link>https://www.vbforums.com/</link>
		</image>
		<item>
			<title>Registry.CurrentUser.DeleteSubkey issues VS2026 VB10</title>
			<link>https://www.vbforums.com/showthread.php?912147-Registry-CurrentUser-DeleteSubkey-issues-VS2026-VB10&amp;goto=newpost</link>
			<pubDate>Fri, 17 Jul 2026 16:59:20 GMT</pubDate>
			<description><![CDATA[Given the following:

Code:
---------
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\MyTestKey", "MyTestKeyValue", "This is a test value.")
---------

I wish to do one of the following:
  a. Delete "MyTestKeyValue" or
  b. Set "This is a test value" to Nothing.

This is in part to reset settings such as Background Color, Width, Height, Position-x, Position-y (all are REG_DWORD).
DeleteSubKey is not working. Error says key does not exist.
SetValue to Nothing also throws errors.

Thanks in advance.]]></description>
			<content:encoded><![CDATA[<div>Given the following:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">My.Computer.Registry.SetValue(&quot;HKEY_CURRENT_USER\MyTestKey&quot;, &quot;MyTestKeyValue&quot;, &quot;This is a test value.&quot;)</code><hr />
</div><br />
I wish to do one of the following:<br />
  a. Delete &quot;MyTestKeyValue&quot; or<br />
  b. Set &quot;This is a test value&quot; to Nothing.<br />
<br />
This is in part to reset settings such as Background Color, Width, Height, Position-x, Position-y (all are REG_DWORD).<br />
DeleteSubKey is not working. Error says key does not exist.<br />
SetValue to Nothing also throws errors.<br />
<br />
Thanks in advance.</div>

]]></content:encoded>
			<category domain="https://www.vbforums.com/forumdisplay.php?25-Visual-Basic-NET">Visual Basic .NET</category>
			<dc:creator>scot-65</dc:creator>
			<guid isPermaLink="true">https://www.vbforums.com/showthread.php?912147-Registry-CurrentUser-DeleteSubkey-issues-VS2026-VB10</guid>
		</item>
		<item>
			<title><![CDATA["Concurrency violation: the DeleteCommand affected 0 of the expected 1 records."]]></title>
			<link>https://www.vbforums.com/showthread.php?912146-quot-Concurrency-violation-the-DeleteCommand-affected-0-of-the-expected-1-records-quot&amp;goto=newpost</link>
			<pubDate>Wed, 15 Jul 2026 20:42:54 GMT</pubDate>
			<description><![CDATA[I have an array of DataTables and Adapters

In this instance I have assigned one of the tables to a unique DataTable varable "rs" which is associated with the giLastTableIndex index as appears in the update command below

I wish to delete a row and update the DataTable


Code:
---------
Dim rRow As DataRow

For Each rRow In rs.Rows
				With rRow
					If .Item("DVN_SHAFT") = sDVN_SHAFT And .Item("DP") = fDP And .Item("PR_ANG") = fPR_ANG And .Item("DVR_N_T") = fDVR_N_T And .Item("DVN_N_T") = fDVN_N_T And .Item("DVR_AD") = fDVR_AD And .Item("DVN_AD") = fDVN_AD Then
						rRow.Delete()
						Exit For

					End If
				End With
Next rRow

iRet = gda(giLastTableIndex).Update(gdt(giLastTableIndex))
---------
The update results in the concurrency violation

I have looked for instances where I am holding the DataTable open with another variable and I do not believe I have any.

Suggestions?]]></description>
			<content:encoded><![CDATA[<div>I have an array of DataTables and Adapters<br />
<br />
In this instance I have assigned one of the tables to a unique DataTable varable &quot;rs&quot; which is associated with the giLastTableIndex index as appears in the update command below<br />
<br />
I wish to delete a row and update the DataTable<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Dim rRow As DataRow<br />
<br />
For Each rRow In rs.Rows<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With rRow<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If .Item(&quot;DVN_SHAFT&quot;) = sDVN_SHAFT And .Item(&quot;DP&quot;) = fDP And .Item(&quot;PR_ANG&quot;) = fPR_ANG And .Item(&quot;DVR_N_T&quot;) = fDVR_N_T And .Item(&quot;DVN_N_T&quot;) = fDVN_N_T And .Item(&quot;DVR_AD&quot;) = fDVR_AD And .Item(&quot;DVN_AD&quot;) = fDVN_AD Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rRow.Delete()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit For<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End With<br />
Next rRow<br />
<br />
iRet = gda(giLastTableIndex).Update(gdt(giLastTableIndex))</code><hr />
</div>The update results in the concurrency violation<br />
<br />
I have looked for instances where I am holding the DataTable open with another variable and I do not believe I have any.<br />
<br />
Suggestions?</div>

]]></content:encoded>
			<category domain="https://www.vbforums.com/forumdisplay.php?25-Visual-Basic-NET">Visual Basic .NET</category>
			<dc:creator>Richard Friedman</dc:creator>
			<guid isPermaLink="true">https://www.vbforums.com/showthread.php?912146-quot-Concurrency-violation-the-DeleteCommand-affected-0-of-the-expected-1-records-quot</guid>
		</item>
		<item>
			<title>Webview2 Deployment</title>
			<link>https://www.vbforums.com/showthread.php?912119-Webview2-Deployment&amp;goto=newpost</link>
			<pubDate>Fri, 03 Jul 2026 14:32:49 GMT</pubDate>
			<description><![CDATA[Hi all,

I recently converted a VB.net (VS 2022) Desktop Application from a WebBrowser control to a WebView2 Control. I have everything working just as I would like. When I create an installer and include all of the dependencies then install my application, the application will not display the form that has the WebView2 control on it and I get this error...

Microsoft.Web.WebView2.WinForms, Version=1.0.4071.0, Culture=neutral, PublicKeyToken=2a8ab48044d2601e' or one of its dependencies. The system cannot find the file specified.

When I look up this error, it tells me I am missing a dependency, but I have created a setup and included all of the dependencies. I have also tried to install the Evergreen version of the WebView2 files and that installer tells me all the WebView2 dependencies are already installed on my PC. 

Does anyone have a suggestion?

Thank you.]]></description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I recently converted a VB.net (VS 2022) Desktop Application from a WebBrowser control to a WebView2 Control. I have everything working just as I would like. When I create an installer and include all of the dependencies then install my application, the application will not display the form that has the WebView2 control on it and I get this error...<br />
<br />
Microsoft.Web.WebView2.WinForms, Version=1.0.4071.0, Culture=neutral, PublicKeyToken=2a8ab48044d2601e' or one of its dependencies. The system cannot find the file specified.<br />
<br />
When I look up this error, it tells me I am missing a dependency, but I have created a setup and included all of the dependencies. I have also tried to install the Evergreen version of the WebView2 files and that installer tells me all the WebView2 dependencies are already installed on my PC. <br />
<br />
Does anyone have a suggestion?<br />
<br />
Thank you.</div>

]]></content:encoded>
			<category domain="https://www.vbforums.com/forumdisplay.php?25-Visual-Basic-NET">Visual Basic .NET</category>
			<dc:creator>CWCWOOD</dc:creator>
			<guid isPermaLink="true">https://www.vbforums.com/showthread.php?912119-Webview2-Deployment</guid>
		</item>
		<item>
			<title>Weird Array-related issue.</title>
			<link>https://www.vbforums.com/showthread.php?912114-Weird-Array-related-issue&amp;goto=newpost</link>
			<pubDate>Tue, 30 Jun 2026 20:16:42 GMT</pubDate>
			<description><![CDATA[I'm not sure what's going on, but the following code conks out at the 4th iteration (of 12) and I can't figure out why.

Short version: I am trying to set up a table map ahead of creating a SQLite database. The data for this is pulled from the following declarations:

Code:
---------
        ReDim TABLE_ACTUAL_NAME(COUNT_TABLE)
        ReDim TABLE_COLUMN_LIST(COUNT_TABLE)
        ReDim TABLE_COLUMN_TYPE(COUNT_TABLE)
        ReDim TABLE_CREATE_CODE(COUNT_TABLE)
        ReDim TABLE_DESCRIPTION(COUNT_TABLE)
        ReDim TABLE_DISPLAYNAME(COUNT_TABLE)
        ReDim TABLE_INDEXCOLUMN(COUNT_TABLE)
        ' ---[ Table 00 - DO NOT USE/COUNT! ]--------------------------------------------
        TABLE_ACTUAL_NAME(0) = flEncapsulate(MSG_MSC_INVALID, "[")
        TABLE_COLUMN_LIST(0) = MSG_MSC_INVALID
        TABLE_COLUMN_TYPE(0) = "NULL"
        TABLE_DESCRIPTION(0) = MSG_MSC_INVALID
        TABLE_DISPLAYNAME(0) = MSG_MSC_INVALID & " Table"
        TABLE_INDEXCOLUMN(0) = MSG_MSC_INVALID

        ' ---[ Table 01 - FILETYPE          ]--------------------------------------------
        TABLE_ACTUAL_NAME(1) = "FileType"
        TABLE_COLUMN_LIST(1) = "Extension|Description|MIME|Usage"
        TABLE_COLUMN_TYPE(1) = "VC4|VC40|VC80|VC1"
        TABLE_DESCRIPTION(1) = "Supported File Formats"
        TABLE_DISPLAYNAME(1) = "File Types"
        TABLE_INDEXCOLUMN(1) = "Extension"

        ' ---[ Table 02 - FORMAT            ]--------------------------------------------
        TABLE_ACTUAL_NAME(2) = "Format"
        TABLE_COLUMN_LIST(2) = "ID|Lock|Name|MediaClass|Digital|FileType"
        TABLE_COLUMN_TYPE(2) = "PK|BL0|VC25|IN|BL0|VC4"
        TABLE_DESCRIPTION(2) = "Media Formats"
        TABLE_DISPLAYNAME(2) = "Formats"
        TABLE_INDEXCOLUMN(2) = "ID"

        ' ---[ Table 03 - GENRE             ]--------------------------------------------
        TABLE_ACTUAL_NAME(3) = "Genre"
        TABLE_COLUMN_LIST(3) = "ID|Lock|Name|Audio|Digital|Image|Other|Print|Video"
        TABLE_COLUMN_TYPE(3) = "PK|BL0|VC30|BL0|BL0|BL0|BL0|BL0|BL0"
        TABLE_DESCRIPTION(3) = "Genres"
        TABLE_DISPLAYNAME(3) = "Genres"
        TABLE_INDEXCOLUMN(3) = "ID"

        ' ---[ Table 04 - HONORIFIC         ]--------------------------------------------
        TABLE_ACTUAL_NAME(4) = "Honorific"
        TABLE_COLUMN_LIST(4) = "ID|Lock|Title"
        TABLE_COLUMN_TYPE(4) = "PK|BL0|VC20"
        TABLE_DESCRIPTION(4) = "Titles and Honorifics"
        TABLE_DISPLAYNAME(4) = "Titles"
        TABLE_INDEXCOLUMN(4) = "Title"

        ' ---[ Table 05 - ISO-3166          ]--------------------------------------------
        TABLE_ACTUAL_NAME(5) = "ISO-3166"
        TABLE_COLUMN_LIST(5) = "ID|Lock|Name|Code"
        TABLE_COLUMN_TYPE(5) = "PK|BL0|VC50|VC2"
        TABLE_DESCRIPTION(5) = "Countries of the World (per ISO-3166)"
        TABLE_DISPLAYNAME(5) = "Countries"
        TABLE_INDEXCOLUMN(5) = "Code"

        ' ---[ Table 06 - MEDIA             ]--------------------------------------------
        TABLE_ACTUAL_NAME(6) = "Media"
        TABLE_COLUMN_LIST(6) = "ID|Lock|Name"
        TABLE_COLUMN_TYPE(6) = "PK|BL0|VC20"
        TABLE_DESCRIPTION(6) = "Source Media"
        TABLE_DISPLAYNAME(6) = "Media"
        TABLE_INDEXCOLUMN(6) = "ID"

        ' ---[ Table 07 - PERIOD            ]--------------------------------------------
        TABLE_ACTUAL_NAME(7) = "Period"
        TABLE_COLUMN_LIST(7) = "ID|Lock|Name|Start|End|Print|Music|Visual"
        TABLE_COLUMN_TYPE(7) = "PK|BL0|VC15|VC10|VC10|BL0|BL0|BL0"
        TABLE_DESCRIPTION(7) = "Creative Periods"
        TABLE_DISPLAYNAME(7) = "Periods"
        TABLE_INDEXCOLUMN(7) = "ID"

        ' ---[ Table 08 - SCHOLAR           ]--------------------------------------------
        TABLE_ACTUAL_NAME(8) = "Scholar"
        TABLE_COLUMN_LIST(8) = "ID|Lock|CatalogName|Scholar|Token"
        TABLE_COLUMN_TYPE(8) = "PK|BL0|VC60|VC80|VC15"
        TABLE_DESCRIPTION(8) = "Scholarly Catalogs"
        TABLE_DISPLAYNAME(8) = "Scholars"
        TABLE_INDEXCOLUMN(8) = "ID"

        ' ---[ Table 09 - SPARS             ]--------------------------------------------
        TABLE_ACTUAL_NAME(9) = "SPARS"
        TABLE_COLUMN_LIST(9) = "ID|Lock|Code"
        TABLE_COLUMN_TYPE(9) = "PK|BL0|VC3"
        TABLE_DESCRIPTION(9) = "SPARS Codes"
        TABLE_DISPLAYNAME(9) = "SPARS Codes"
        TABLE_INDEXCOLUMN(9) = "ID"

        ' ---[ Table 10 - TALENT            ]--------------------------------------------
        TABLE_ACTUAL_NAME(10) = "Talent"
        TABLE_COLUMN_LIST(10) = "ID|Honorific|GivenName|Surname|Suffix|Alias|ABorn|DOB|POB|ADeath|DOD|POD|Actor|Arranger|Author|Composer|ThematicCatalog|Conductor|Dancer|Director|Instrumentalist|Instrument|Narrator|Visual|Vocalist|VocalRegister|Other|WebSite"
        TABLE_COLUMN_TYPE(10) = "PK|VC20|VC50|VC50|VC10|VC50|BL0|VC10|VC40|BL0|VC10|VC40|BL0|BL0|BL0|BL0|IN|BL0|BL0|BL0|BL0|VC50|BL0|BL0|BL0|VC30|VC40|IN"
        TABLE_DESCRIPTION(10) = "Artistic Talents"
        TABLE_DISPLAYNAME(10) = "Artists"
        TABLE_INDEXCOLUMN(10) = "ID"

        ' ---[ Table 11 - VOICE             ]--------------------------------------------
        TABLE_ACTUAL_NAME(11) = "Voice"
        TABLE_COLUMN_LIST(11) = "ID|Lock|Name"
        TABLE_COLUMN_TYPE(11) = "PK|BL0|VC30"
        TABLE_DESCRIPTION(11) = "Vocal ranges and registers"
        TABLE_DISPLAYNAME(11) = "Vocal Registers"
        TABLE_INDEXCOLUMN(11) = "ID"

        ' ---[ Table 12 - WEBSITE           ]--------------------------------------------
        TABLE_ACTUAL_NAME(12) = "Website"
        TABLE_COLUMN_LIST(12) = "ID|Lock|Name|URL|Secure"
        TABLE_COLUMN_TYPE(12) = "PK|BL0|VC60|VC250|BL0"
        TABLE_DESCRIPTION(12) = "Reference Web Sites"
        TABLE_DISPLAYNAME(12) = "Web Sites"
        TABLE_INDEXCOLUMN(12) = "ID"
---------
The part in question is where TABLE_COLUMN_LIST/TABLE_COLUMN_TYPE are processed; the variable, COUNT_TABLE is declared as 12:


Code:
---------
   Public Sub GenerateTableCode()
       Dim __arrNames() As Array 
       Dim __arrNamesExploded() As String
       Dim __arrTypes() As Array
       Dim __arrTypesExploded() As String
       Dim __strColumnDefinition As String
       Dim __strFullTableMap As String

       For __TableCount = 0 To COUNT_TABLE - 1
           __strFullTableMap = ""
           __arrNamesExploded = TABLE_COLUMN_LIST(__TableCount).Split("|"c)
           __arrTypesExploded = TABLE_COLUMN_TYPE(__TableCount).Split("|"c)

           ReDim __arrNames(UBound(__arrNamesExploded))
           ReDim __arrTypes(UBound(__arrTypesExploded))
           __arrNames(__TableCount) = flTableGenGetElements(__arrNamesExploded(__TableCount))
           __arrTypes(__TableCount) = flTableGenGetElements(__arrTypesExploded(__TableCount))

           For __ColumnCount = 0 To UBound(__arrNames)
               __strColumnDefinition = flEncapsulate(__arrNamesExploded(__ColumnCount), "[") & " " & flTableGenExpandType(__arrTypesExploded(__ColumnCount))
               If __ColumnCount < UBound(__arrNames) Then __strColumnDefinition = __strColumnDefinition & ","
               __strFullTableMap = __strFullTableMap & __strColumnDefinition
           Next
           TABLE_CREATE_CODE(__TableCount) = __strFullTableMap

       Next __TableCount
---------
The flTableGenElements and flTableGenExpandType functions are:

Code:
---------
    Public Function flTableGenGetElements(ByVal _strElementList As String) As String()
        Dim __arrList() As String
        __arrList = _strElementList.Split("|"c)
        Return __arrList
    End Function

    Public Function flTableGenExpandType(ByVal _strColumnCode As String) As String
        Dim __strColumnType As String

        Select Case Left(UCase(_strColumnCode), 2)
            Case "BB"
                __strColumnType = "BLOB"
            Case "BI"
                __strColumnType = "BIGINT"
            Case "BL"
                __strColumnType = IIf(Len(_strColumnCode) = 2, "BOOLEAN DEFAULT (0)", "BOOLEAN DEFAULT (" & Mid(_strColumnCode, 3) & ")")
            Case "BU"
                __strColumnType = "UNSIGNED BIG INT"
            Case "CH"
                __strColumnType = "CHARACTER(" & Mid(_strColumnCode, 3) & ")"
            Case "CL"
                __strColumnType = "CLOB"
            Case "DA"
                __strColumnType = "DATE"
            Case "DB"
                __strColumnType = "DOUBLE"
            Case "DE"
                __strColumnType = IIf(Len(_strColumnCode) = 2, "DECIMAL", "DECIMAL (" & Mid(_strColumnCode, 3) & ")")
            Case "DP"
                __strColumnType = "DOUBLE PRECISION"
            Case "DT"
                __strColumnType = "DATETIME"
            Case "FL"
                __strColumnType = "FLOAT"
            Case "I2"
                __strColumnType = "INT2"
            Case "I8"
                __strColumnType = "INT8"
            Case "IM"
                __strColumnType = "MEDIUMINT"
            Case "IN"
                __strColumnType = "INTEGER"
            Case "IS"
                __strColumnType = "SMALLINT"
            Case "IT"
                __strColumnType = "TINYINT"
            Case "NC"
                __strColumnType = "NATIVE CHARACTER(" & Mid(_strColumnCode, 3) & ")"
            Case "NO"
                __strColumnType = "NUMERIC"
            Case "NV"
                __strColumnType = "NVARCHAR(" & Mid(_strColumnCode, 3) & ")"
            Case "PK"
                __strColumnType = "INTEGER PRIMARY KEY AUTOINCREMENT"
            Case "RE"
                __strColumnType = "REAL"
            Case "TE", "TX"
                __strColumnType = "TEXT"
            Case "VA"
                __strColumnType = "VARYING CHARACTER(" & Mid(_strColumnCode, 3) & ")"
            Case "VC"
                __strColumnType = "VARCHAR(" & Mid(_strColumnCode, 3) & ")"
            Case Else
                __strColumnType = "NULL"
        End Select

        Return __strColumnType
    End Function
---------
The flEncapsulate function encloses the passed string with whatver token is passed to it (L/R applied as necessary, such as with the square brackets in this implementation).

My issue is that in the 4th iteration of the loop, I get an "*System.IndexOutOfRangeException:* 'Index was outside the bounds of the array.'" error. The array sizes correspond to the extrapolated sizes, etc. I have "played swapsies" between datasets (eg. switched table 4 with one of the other 11) to no avail. It always fails at the 4th iteration.

What I am looking to ending up with is:__arrNames holding an exploded list of column names for the current iteration; it gets reset for the next iteration.
__arrTypes holding an exploded list of column types for the current iteration; it gets reset for the next iteration.
TABLE_CREATE_CODE(__TableCount) holding a construct derived from the two exploded lists (i.e. [ID] INTEGER PRIMARY KEY AUTOINCREMENT,[Lock] BOOLEAN DEFAULT (0),[Name] VARCHAR(25),[MediaClass] INTEGER,[Digital] BOOLEAN DEFAULT (0),[FileType] VARCHAR(4) in the case of Table 02), and I am ending up with this for TABLE_CREATE_CODE(0-3), but then the error occurs.

Any idea why, and what I need to do to fix it?]]></description>
			<content:encoded><![CDATA[<div>I'm not sure what's going on, but the following code conks out at the 4th iteration (of 12) and I can't figure out why.<br />
<br />
Short version: I am trying to set up a table map ahead of creating a SQLite database. The data for this is pulled from the following declarations:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">ReDim</font> TABLE_ACTUAL_NAME(COUNT_TABLE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">ReDim</font> TABLE_COLUMN_LIST(COUNT_TABLE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">ReDim</font> TABLE_COLUMN_TYPE(COUNT_TABLE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">ReDim</font> TABLE_CREATE_CODE(COUNT_TABLE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">ReDim</font> TABLE_DESCRIPTION(COUNT_TABLE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">ReDim</font> TABLE_DISPLAYNAME(COUNT_TABLE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">ReDim</font> TABLE_INDEXCOLUMN(COUNT_TABLE)<font color="#008000"><br />
</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 00 - DO NOT USE/COUNT! ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(0) = <font color="#74531f">flEncapsulate</font>(MSG_MSC_INVALID, <font color="#a31515">&quot;[&quot;</font>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(0) = MSG_MSC_INVALID<br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(0) = <font color="#a31515">&quot;NULL&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(0) = MSG_MSC_INVALID<br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(0) = MSG_MSC_INVALID &amp; <font color="#a31515">&quot; Table&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(0) = MSG_MSC_INVALID<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 01 - FILETYPE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(1) = <font color="#a31515">&quot;FileType&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(1) = <font color="#a31515">&quot;Extension|Description|MIME|Usage&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(1) = <font color="#a31515">&quot;VC4|VC40|VC80|VC1&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(1) = <font color="#a31515">&quot;Supported File Formats&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(1) = <font color="#a31515">&quot;File Types&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(1) = <font color="#a31515">&quot;Extension&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 02 - FORMAT&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(2) = <font color="#a31515">&quot;Format&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(2) = <font color="#a31515">&quot;ID|Lock|Name|MediaClass|Digital|FileType&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(2) = <font color="#a31515">&quot;PK|BL0|VC25|IN|BL0|VC4&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(2) = <font color="#a31515">&quot;Media Formats&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(2) = <font color="#a31515">&quot;Formats&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(2) = <font color="#a31515">&quot;ID&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 03 - GENRE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(3) = <font color="#a31515">&quot;Genre&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(3) = <font color="#a31515">&quot;ID|Lock|Name|Audio|Digital|Image|Other|Print|Video&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(3) = <font color="#a31515">&quot;PK|BL0|VC30|BL0|BL0|BL0|BL0|BL0|BL0&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(3) = <font color="#a31515">&quot;Genres&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(3) = <font color="#a31515">&quot;Genres&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(3) = <font color="#a31515">&quot;ID&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 04 - HONORIFIC&nbsp; &nbsp; &nbsp; &nbsp;  ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(4) = <font color="#a31515">&quot;Honorific&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(4) = <font color="#a31515">&quot;ID|Lock|Title&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(4) = <font color="#a31515">&quot;PK|BL0|VC20&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(4) = <font color="#a31515">&quot;Titles and Honorifics&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(4) = <font color="#a31515">&quot;Titles&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(4) = <font color="#a31515">&quot;Title&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 05 - ISO-3166&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(5) = <font color="#a31515">&quot;ISO-3166&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(5) = <font color="#a31515">&quot;ID|Lock|Name|Code&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(5) = <font color="#a31515">&quot;PK|BL0|VC50|VC2&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(5) = <font color="#a31515">&quot;Countries of the World (per ISO-3166)&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(5) = <font color="#a31515">&quot;Countries&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(5) = <font color="#a31515">&quot;Code&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 06 - MEDIA&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(6) = <font color="#a31515">&quot;Media&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(6) = <font color="#a31515">&quot;ID|Lock|Name&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(6) = <font color="#a31515">&quot;PK|BL0|VC20&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(6) = <font color="#a31515">&quot;Source Media&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(6) = <font color="#a31515">&quot;Media&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(6) = <font color="#a31515">&quot;ID&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 07 - PERIOD&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(7) = <font color="#a31515">&quot;Period&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(7) = <font color="#a31515">&quot;ID|Lock|Name|Start|End|Print|Music|Visual&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(7) = <font color="#a31515">&quot;PK|BL0|VC15|VC10|VC10|BL0|BL0|BL0&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(7) = <font color="#a31515">&quot;Creative Periods&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(7) = <font color="#a31515">&quot;Periods&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(7) = <font color="#a31515">&quot;ID&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 08 - SCHOLAR&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(8) = <font color="#a31515">&quot;Scholar&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(8) = <font color="#a31515">&quot;ID|Lock|CatalogName|Scholar|Token&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(8) = <font color="#a31515">&quot;PK|BL0|VC60|VC80|VC15&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(8) = <font color="#a31515">&quot;Scholarly Catalogs&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(8) = <font color="#a31515">&quot;Scholars&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(8) = <font color="#a31515">&quot;ID&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 09 - SPARS&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(9) = <font color="#a31515">&quot;SPARS&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(9) = <font color="#a31515">&quot;ID|Lock|Code&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(9) = <font color="#a31515">&quot;PK|BL0|VC3&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(9) = <font color="#a31515">&quot;SPARS Codes&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(9) = <font color="#a31515">&quot;SPARS Codes&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(9) = <font color="#a31515">&quot;ID&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 10 - TALENT&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(10) = <font color="#a31515">&quot;Talent&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(10) = <font color="#a31515">&quot;ID|Honorific|GivenName|Surname|Suffix|Alias|ABorn|DOB|POB|ADeath|DOD|POD|Actor|Arranger|Author|Composer|ThematicCatalog|Conductor|Dancer|Director|Instrumentalist|Instrument|Narrator|Visual|Vocalist|VocalRegister|Other|WebSite&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(10) = <font color="#a31515">&quot;PK|VC20|VC50|VC50|VC10|VC50|BL0|VC10|VC40|BL0|VC10|VC40|BL0|BL0|BL0|BL0|IN|BL0|BL0|BL0|BL0|VC50|BL0|BL0|BL0|VC30|VC40|IN&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(10) = <font color="#a31515">&quot;Artistic Talents&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(10) = <font color="#a31515">&quot;Artists&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(10) = <font color="#a31515">&quot;ID&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 11 - VOICE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(11) = <font color="#a31515">&quot;Voice&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(11) = <font color="#a31515">&quot;ID|Lock|Name&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(11) = <font color="#a31515">&quot;PK|BL0|VC30&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(11) = <font color="#a31515">&quot;Vocal ranges and registers&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(11) = <font color="#a31515">&quot;Vocal Registers&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(11) = <font color="#a31515">&quot;ID&quot;</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#008000">' ---[ Table 12 - WEBSITE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ]--------------------------------------------</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_ACTUAL_NAME(12) = <font color="#a31515">&quot;Website&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_LIST(12) = <font color="#a31515">&quot;ID|Lock|Name|URL|Secure&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_COLUMN_TYPE(12) = <font color="#a31515">&quot;PK|BL0|VC60|VC250|BL0&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DESCRIPTION(12) = <font color="#a31515">&quot;Reference Web Sites&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_DISPLAYNAME(12) = <font color="#a31515">&quot;Web Sites&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; TABLE_INDEXCOLUMN(12) = <font color="#a31515">&quot;ID&quot;</font></code><hr />
</div>The part in question is where TABLE_COLUMN_LIST/TABLE_COLUMN_TYPE are processed; the variable, <span style="font-family: courier new">COUNT_TABLE</span> is declared as 12:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp;  <font color="#0000ff">Public</font> <font color="#0000ff">Sub</font> <font color="#74531f">GenerateTableCode</font>()<br />
&nbsp; &nbsp; &nbsp;  <font color="#0000ff">Dim</font> <font color="#1f377f">__arrNames</font>() <font color="#0000ff">As</font> <font color="#2b91af">Array</font> <br />
&nbsp; &nbsp; &nbsp;  <font color="#0000ff">Dim</font> <font color="#1f377f">__arrNamesExploded</font>() <font color="#0000ff">As</font> <font color="#0000ff">String</font><br />
&nbsp; &nbsp; &nbsp;  <font color="#0000ff">Dim</font> <font color="#1f377f">__arrTypes</font>() <font color="#0000ff">As</font> <font color="#2b91af">Array</font><br />
&nbsp; &nbsp; &nbsp;  <font color="#0000ff">Dim</font> <font color="#1f377f">__arrTypesExploded</font>() <font color="#0000ff">As</font> <font color="#0000ff">String</font><br />
&nbsp; &nbsp; &nbsp;  <font color="#0000ff">Dim</font> <font color="#1f377f">__strColumnDefinition</font> <font color="#0000ff">As</font> <font color="#0000ff">String</font><br />
&nbsp; &nbsp; &nbsp;  <font color="#0000ff">Dim</font> <font color="#1f377f">__strFullTableMap</font> <font color="#0000ff">As</font> <font color="#0000ff">String</font><br />
<br />
&nbsp; &nbsp; &nbsp;  <font color="#8f08c4">For</font> <font color="#1f377f">__TableCount</font> = 0 <font color="#8f08c4">To</font> COUNT_TABLE - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#1f377f">__strFullTableMap</font> = <font color="#a31515">&quot;&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#1f377f">__arrNamesExploded</font> = TABLE_COLUMN_LIST(<font color="#1f377f">__TableCount</font>).<font color="#74531f">Split</font>(<font color="#a31515">&quot;|&quot;c</font>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#1f377f">__arrTypesExploded</font> = TABLE_COLUMN_TYPE(<font color="#1f377f">__TableCount</font>).<font color="#74531f">Split</font>(<font color="#a31515">&quot;|&quot;c</font>)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#0000ff">ReDim</font> <font color="#1f377f">__arrNames</font>(<font color="#74531f">UBound</font>(<font color="#1f377f">__arrNamesExploded</font>))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#0000ff">ReDim</font> <font color="#1f377f">__arrTypes</font>(<font color="#74531f">UBound</font>(<font color="#1f377f">__arrTypesExploded</font>))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#1f377f">__arrNames</font>(<font color="#1f377f">__TableCount</font>) = <font color="#74531f">flTableGenGetElements</font>(<font color="#1f377f">__arrNamesExploded</font>(<font color="#1f377f">__TableCount</font>))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#1f377f">__arrTypes</font>(<font color="#1f377f">__TableCount</font>) = <font color="#74531f">flTableGenGetElements</font>(<font color="#1f377f">__arrTypesExploded</font>(<font color="#1f377f">__TableCount</font>))<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#8f08c4">For</font> <font color="#1f377f">__ColumnCount</font> = 0 <font color="#8f08c4">To</font> <font color="#74531f">UBound</font>(<font color="#1f377f">__arrNames</font>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#1f377f">__strColumnDefinition</font> = <font color="#74531f">flEncapsulate</font>(<font color="#1f377f">__arrNamesExploded</font>(<font color="#1f377f">__ColumnCount</font>), <font color="#a31515">&quot;[&quot;</font>) &amp; <font color="#a31515">&quot; &quot;</font> &amp; <font color="#74531f">flTableGenExpandType</font>(<font color="#1f377f">__arrTypesExploded</font>(<font color="#1f377f">__ColumnCount</font>))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#8f08c4">If</font> <font color="#1f377f">__ColumnCount</font> &lt; <font color="#74531f">UBound</font>(<font color="#1f377f">__arrNames</font>) <font color="#8f08c4">Then</font> <font color="#1f377f">__strColumnDefinition</font> = <font color="#1f377f">__strColumnDefinition</font> &amp; <font color="#a31515">&quot;,&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#1f377f">__strFullTableMap</font> = <font color="#1f377f">__strFullTableMap</font> &amp; <font color="#1f377f">__strColumnDefinition</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <font color="#8f08c4">Next</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  TABLE_CREATE_CODE(<font color="#1f377f">__TableCount</font>) = <font color="#1f377f">__strFullTableMap</font><br />
<br />
&nbsp; &nbsp; &nbsp;  <font color="#8f08c4">Next</font> <font color="#1f377f">__TableCount</font></code><hr />
</div>The <span style="font-family: courier new">flTableGenElements </span>and <span style="font-family: courier new">flTableGenExpandType </span>functions are:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp; &nbsp; <font color="#0000ff">Public</font> <font color="#0000ff">Function</font> <font color="#74531f">flTableGenGetElements</font>(<font color="#0000ff">ByVal</font> <font color="#1f377f">_strElementList</font> <font color="#0000ff">As</font> <font color="#0000ff">String</font>) <font color="#0000ff">As</font> <font color="#0000ff">String</font>()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">Dim</font> <font color="#1f377f">__arrList</font>() <font color="#0000ff">As</font> <font color="#0000ff">String</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__arrList</font> = <font color="#1f377f">_strElementList</font>.<font color="#74531f">Split</font>(<font color="#a31515">&quot;|&quot;c</font>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Return</font> <font color="#1f377f">__arrList</font><br />
&nbsp; &nbsp; <font color="#0000ff">End</font> <font color="#0000ff">Function</font><br />
<br />
&nbsp; &nbsp; <font color="#0000ff">Public</font> <font color="#0000ff">Function</font> <font color="#74531f">flTableGenExpandType</font>(<font color="#0000ff">ByVal</font> <font color="#1f377f">_strColumnCode</font> <font color="#0000ff">As</font> <font color="#0000ff">String</font>) <font color="#0000ff">As</font> <font color="#0000ff">String</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">Dim</font> <font color="#1f377f">__strColumnType</font> <font color="#0000ff">As</font> <font color="#0000ff">String</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Select</font> <font color="#8f08c4">Case</font> <font color="#74531f">Left</font>(<font color="#74531f">UCase</font>(<font color="#1f377f">_strColumnCode</font>), 2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;BB&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;BLOB&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;BI&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;BIGINT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;BL&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#74531f">IIf</font>(<font color="#74531f">Len</font>(<font color="#1f377f">_strColumnCode</font>) = 2, <font color="#a31515">&quot;BOOLEAN DEFAULT (0)&quot;</font>, <font color="#a31515">&quot;BOOLEAN DEFAULT (&quot;</font> &amp; <font color="#74531f">Mid</font>(<font color="#1f377f">_strColumnCode</font>, 3) &amp; <font color="#a31515">&quot;)&quot;</font>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;BU&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;UNSIGNED BIG INT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;CH&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;CHARACTER(&quot;</font> &amp; <font color="#74531f">Mid</font>(<font color="#1f377f">_strColumnCode</font>, 3) &amp; <font color="#a31515">&quot;)&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;CL&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;CLOB&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;DA&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;DATE&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;DB&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;DOUBLE&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;DE&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#74531f">IIf</font>(<font color="#74531f">Len</font>(<font color="#1f377f">_strColumnCode</font>) = 2, <font color="#a31515">&quot;DECIMAL&quot;</font>, <font color="#a31515">&quot;DECIMAL (&quot;</font> &amp; <font color="#74531f">Mid</font>(<font color="#1f377f">_strColumnCode</font>, 3) &amp; <font color="#a31515">&quot;)&quot;</font>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;DP&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;DOUBLE PRECISION&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;DT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;DATETIME&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;FL&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;FLOAT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;I2&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;INT2&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;I8&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;INT8&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;IM&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;MEDIUMINT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;IN&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;INTEGER&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;IS&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;SMALLINT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;IT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;TINYINT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;NC&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;NATIVE CHARACTER(&quot;</font> &amp; <font color="#74531f">Mid</font>(<font color="#1f377f">_strColumnCode</font>, 3) &amp; <font color="#a31515">&quot;)&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;NO&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;NUMERIC&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;NV&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;NVARCHAR(&quot;</font> &amp; <font color="#74531f">Mid</font>(<font color="#1f377f">_strColumnCode</font>, 3) &amp; <font color="#a31515">&quot;)&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;PK&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;INTEGER PRIMARY KEY AUTOINCREMENT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;RE&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;REAL&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;TE&quot;</font>, <font color="#a31515">&quot;TX&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;TEXT&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;VA&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;VARYING CHARACTER(&quot;</font> &amp; <font color="#74531f">Mid</font>(<font color="#1f377f">_strColumnCode</font>, 3) &amp; <font color="#a31515">&quot;)&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#a31515">&quot;VC&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;VARCHAR(&quot;</font> &amp; <font color="#74531f">Mid</font>(<font color="#1f377f">_strColumnCode</font>, 3) &amp; <font color="#a31515">&quot;)&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Case</font> <font color="#0000ff">Else</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#1f377f">__strColumnType</font> = <font color="#a31515">&quot;NULL&quot;</font><br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">End</font> <font color="#8f08c4">Select</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <font color="#8f08c4">Return</font> <font color="#1f377f">__strColumnType</font><br />
&nbsp; &nbsp; <font color="#0000ff">End</font> <font color="#0000ff">Function</font></code><hr />
</div>The <span style="font-family: courier new">flEncapsulate </span>function encloses the passed string with whatver token is passed to it (L/R applied as necessary, such as with the square brackets in this implementation).<br />
<br />
My issue is that in the 4th iteration of the loop, I get an &quot;<font color="#ff0000"><b>System.IndexOutOfRangeException:</b> 'Index was outside the bounds of the array.'</font>&quot; error. The array sizes correspond to the extrapolated sizes, etc. I have &quot;played swapsies&quot; between datasets (eg. switched table 4 with one of the other 11) to no avail. It always fails at the 4th iteration.<br />
<br />
What I am looking to ending up with is:<div style="margin-left:40px"><span style="font-family: courier new">__arrNames</span> holding an exploded list of column names for the current iteration; it gets reset for the next iteration.<br />
<span style="font-family: courier new">__arrTypes</span> holding an exploded list of column types for the current iteration; it gets reset for the next iteration.<br />
<span style="font-family: courier new">TABLE_CREATE_CODE(__TableCount)</span> holding a construct derived from the two exploded lists (i.e. <font color="#0000cd"><span style="font-family: courier new">[ID] INTEGER PRIMARY KEY AUTOINCREMENT,[Lock] BOOLEAN DEFAULT (0),[Name] VARCHAR(25),[MediaClass] INTEGER,[Digital] BOOLEAN DEFAULT (0),[FileType] VARCHAR(4)</span></font> in the case of Table 02), and I am ending up with this for <span style="font-family: courier new">TABLE_CREATE_CODE(0-3)</span>, but then the error occurs.</div><br />
Any idea why, and what I need to do to fix it?</div>

]]></content:encoded>
			<category domain="https://www.vbforums.com/forumdisplay.php?25-Visual-Basic-NET">Visual Basic .NET</category>
			<dc:creator>Erlkoenig</dc:creator>
			<guid isPermaLink="true">https://www.vbforums.com/showthread.php?912114-Weird-Array-related-issue</guid>
		</item>
		<item>
			<title>Exclude last record from DatagridView while retrieving data -Using SQL Server</title>
			<link>https://www.vbforums.com/showthread.php?912099-Exclude-last-record-from-DatagridView-while-retrieving-data-Using-SQL-Server&amp;goto=newpost</link>
			<pubDate>Sun, 21 Jun 2026 14:23:24 GMT</pubDate>
			<description><![CDATA[Hi,

How to exclude the last record from DatagridView while retrieving data (I am using a SQL Server Database)?

For example, I have 10 records for a particular customer and I want to show only 9 records (excluding the last record). The code below shows all the 10 records belongs to that customer and it needs to be modified. 



Code:
---------
Private Sub LoadSearchSalesData()
dgvSales.Columns.Clear()

Try
Dim query As String = "Select CustNo,TrNo,TrDate,Sum(TrAmount) As INVOICE_AMOUNT from SalesTable Where [CustNo] LIKE '" & txtSearchCustNo.Text & "' Group By CustNo,TrNo,TrDate  ORDER BY TrNo DESC"

            Dim adapter As New SqlDataAdapter(query, Connection)
            Dim table As New DataTable()
            adapter.Fill(table)
            dgvSales.DataSource = table

        Catch ex As Exception
            MessageBox.Show($"Error loading Sales Data: {ex.Message}")
     End Try
 End Sub
---------
Please support me with the code.]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
How to exclude the last record from DatagridView while retrieving data (I am using a SQL Server Database)?<br />
<br />
For example, I have 10 records for a particular customer and I want to show only 9 records (excluding the last record). The code below shows all the 10 records belongs to that customer and it needs to be modified. <br />
<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Private Sub LoadSearchSalesData()<br />
dgvSales.Columns.Clear()<br />
<br />
Try<br />
Dim query As String = &quot;Select CustNo,TrNo,TrDate,Sum(TrAmount) As INVOICE_AMOUNT from SalesTable Where [CustNo] LIKE '&quot; &amp; txtSearchCustNo.Text &amp; &quot;' Group By CustNo,TrNo,TrDate&nbsp; ORDER BY TrNo DESC&quot;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim adapter As New SqlDataAdapter(query, Connection)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim table As New DataTable()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; adapter.Fill(table)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dgvSales.DataSource = table<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Catch ex As Exception<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox.Show($&quot;Error loading Sales Data: {ex.Message}&quot;)<br />
&nbsp; &nbsp;  End Try<br />
&nbsp;End Sub</code><hr />
</div>Please support me with the code.</div>

]]></content:encoded>
			<category domain="https://www.vbforums.com/forumdisplay.php?25-Visual-Basic-NET">Visual Basic .NET</category>
			<dc:creator>VS2013</dc:creator>
			<guid isPermaLink="true">https://www.vbforums.com/showthread.php?912099-Exclude-last-record-from-DatagridView-while-retrieving-data-Using-SQL-Server</guid>
		</item>
		<item>
			<title>Books about VB and VB.NET</title>
			<link>https://www.vbforums.com/showthread.php?912098-Books-about-VB-and-VB-NET&amp;goto=newpost</link>
			<pubDate>Sun, 21 Jun 2026 05:47:09 GMT</pubDate>
			<description><![CDATA[Hello. I'm looking for books, either the PDF file or the title itself. Basic books are fine, but I'd prefer advanced books that are useful for automation. I'm not looking for anything specific beyond that, and if you know of anything interesting, especially if it's hard to find, I'd be very grateful.]]></description>
			<content:encoded><![CDATA[<div>Hello. I'm looking for books, either the PDF file or the title itself. Basic books are fine, but I'd prefer advanced books that are useful for automation. I'm not looking for anything specific beyond that, and if you know of anything interesting, especially if it's hard to find, I'd be very grateful.</div>

]]></content:encoded>
			<category domain="https://www.vbforums.com/forumdisplay.php?25-Visual-Basic-NET">Visual Basic .NET</category>
			<dc:creator>Surkat</dc:creator>
			<guid isPermaLink="true">https://www.vbforums.com/showthread.php?912098-Books-about-VB-and-VB-NET</guid>
		</item>
	</channel>
</rss>
