Visual Basic General ForumQuestions and discussions not covered in the other VB forums such as Data and Setup. (Not for VB6 questions.)© 2009 Microsoft Corporation. All rights reserved.Wed, 25 Nov 2009 08:43:15 Z0f60fa48-1ceb-41ee-a10a-0dfcee7e19bdhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/00d00067-dc91-4214-bba1-f8e4ed5e1baahttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/00d00067-dc91-4214-bba1-f8e4ed5e1baaWasekMajlishttp://social.msdn.microsoft.com/Profile/en-US/?user=WasekMajlisFinding difficulty in assessing Future warning date<p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:8pt;color:black;font-family:Verdana">Hi every one, <br/><br/>  I made a programme through which I get a feed back clicking a button for a future warning date. I am giving the code below so that you can give me a  easy solution. Let me explain what I have done. I took DateTimePicker to evaluate that. But the problem is, I have to take 12 DateTimePicker to do that job in a single form which is creating a saving problem means when I click save button it takes long time to save. Now, I thought If I can do it by using TextBox in a date format would easeup my save problem. Or it can be MaskedTextBox as well. Below is my code if any one can give me the solution.<br/><br/><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"></span></span></span><span style="font-size:x-small;color:#0000ff">Sub</span><span style="font-size:x-small"> Button1_Click(</span><span style="font-size:x-small;color:#0000ff">ByVal</span><span style="font-size:x-small"> sender </span><span style="font-size:x-small;color:#0000ff">As</span><span style="font-size:x-small"> System.Object, </span><span style="font-size:x-small;color:#0000ff">ByVal</span><span style="font-size:x-small"> e </span><span style="font-size:x-small;color:#0000ff">As</span><span style="font-size:x-small"> System.EventArgs) </span><span style="font-size:x-small;color:#0000ff">Handles</span><span style="font-size:x-small"> Button1.Click<br/></span><span style="font-size:x-small;color:#0000ff">If</span><span style="font-size:x-small"> DateTime.Now &gt; DateTimePicker1.Value.AddYears(1).AddDays(1) </span><span style="font-size:x-small;color:#0000ff">Then<br/></span><span style="font-size:x-small">TextBox1.Text = (</span><span style="font-size:x-small;color:#a31515">&quot;Instuctor CAT Expired&quot;</span><span style="font-size:x-small">)<br/></span><span style="font-size:x-small;color:#0000ff">Else<br/></span><span style="font-size:x-small;color:#0000ff">End</span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff">If<br/></span>    Instead of DateTimePicker I would like to do it by TextBox or MaskedTextBox which needs to be DateFormated to do that evaluation. I tried but could not find any good result. If any one can help</p> <p>Private</p> <p> </p>Tue, 24 Nov 2009 07:05:19 Z2009-11-25T08:43:15Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/dccca845-5139-4fea-91eb-c009ff58b6dbhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/dccca845-5139-4fea-91eb-c009ff58b6dbEgoZahttp://social.msdn.microsoft.com/Profile/en-US/?user=EgoZaNamespace AxWMPLib vs How to install wmp.dll<p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:'Verdana', 'sans-serif';color:black;font-size:8pt" lang=EN-US>Hi,</span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:'Verdana', 'sans-serif';color:black;font-size:8pt" lang=EN-US>I want try code from WMP SDK that use namespace AxWMPLib.</span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:'Verdana', 'sans-serif';color:black;font-size:8pt" lang=EN-US>VS 2008 says that namespace AxWMPLib is wrong.</span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:'Verdana', 'sans-serif';color:black;font-size:8pt" lang=EN-US>I found that i need wmp.dll for it, but i havn't found it in windows\system32 (use server 2008)</span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:'Verdana', 'sans-serif';color:black;font-size:8pt" lang=EN-US>I found that wmp.dll installing with Windows Media Player. I've found link and download WMP(<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=1d224714-e238-4e45-8668-5166114010ca&amp;displaylang=en&amp;Hash=QRNfA%2btEoqQvkuyyw/dd3rih/WmBiyB7QoeCik%2bRVPj%2bqquyeCPY6da2imoKWkAp5V3G7HjvwMaPIvI3viQLrw%3d%3d"><span style="color:#0066dd">http://www.microsoft.com/downloads/details.aspx?FamilyID=1d224714-e238-4e45-8668-5166114010ca&amp;displaylang=en&amp;Hash=QRNfA%2btEoqQvkuyyw%2fdd3rih%2fWmBiyB7QoeCik%2bRVPj%2bqquyeCPY6da2imoKWkAp5V3G7HjvwMaPIvI3viQLrw%3d%3d</span></a>). <br/>But i can't install it on Server 2008. I receive the message during installation process: &quot;There are no any updates for your system&quot;. Install stopped after that.</span></p> <p class=MsoNormal style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:'Verdana', 'sans-serif';color:black;font-size:8pt" lang=EN-US>What should I do? Are there anather ways to install wmp.dll into VS 2008?</span></p>Wed, 25 Nov 2009 07:39:39 Z2009-11-25T08:34:47Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7ffb501e-817d-4865-9145-051ad4485f2chttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7ffb501e-817d-4865-9145-051ad4485f2cAlla2552http://social.msdn.microsoft.com/Profile/en-US/?user=Alla2552Save field without displaying it on the VB formI have a VB 2008 windows application that I'm working on; the data are stored in SQL. I have a lot of fields that user will need to fill out. Some fields that not displayed on the form are actual combination of few filled out fields. For example - user types in first name, middle name and last name in 3 separate boxes on the form and I'd like to combine those and assign it to the &quot;FullName&quot; field. I know it's duplicating the data but this FullName field would need to be merged into report as is in a different program. Another example - user will pick a data in combo box that is binded to a different table, but I need it to auto-populate 3 fields in the main form (those fields are not displayed). I know that I can actually add all those hidden fields on the form and assign calculated values based on user input and then everything is saved with built-in &quot;Update&quot; command. I was wondering if there is a way to specify those few calculated values as parameters and still use &quot;Update&quot; command without actually typing long Update command. I have over 400 fields - very lengthy command.. Hope it makes sense. Thanks!Mon, 23 Nov 2009 21:48:57 Z2009-11-25T08:24:22Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c41da8d6-95fc-48d4-a0a1-fe55a9263129http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c41da8d6-95fc-48d4-a0a1-fe55a9263129Ramazan AKTOLUhttp://social.msdn.microsoft.com/Profile/en-US/?user=Ramazan%20AKTOLUHotkeyHello!<br/>I want add hotkey functions in my console applications.<br/>I'm adding <br/><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>If</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span> <p><span style="font-size:x-small"> GetAsyncKeyState(Keys.LControlKey) </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Then<br/>Console.WriteLine(&quot;Key pressed&quot;)<br/>End If<br/><br/>It is working perfect.<br/><br/>How I can add two or more keys as shortcut?<br/>E.g: Ctrl+a or Shift+a<br/><br/>Thanks for help!</span></span></p><hr class="sig">Ramazan AKTOLUWed, 25 Nov 2009 08:17:19 Z2009-11-25T08:17:20Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/af8f1049-e69e-4045-a9c9-5e8d051fa6d0http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/af8f1049-e69e-4045-a9c9-5e8d051fa6d0blacksaibothttp://social.msdn.microsoft.com/Profile/en-US/?user=blacksaibotDrown Down List in Data Grid View?In my MS Access database a certain column has been given a LookUp query so users can just select the appropriate entry from a drop down list.<br/><br/>How can I apply that same feature to a specific column in my table that is displayed through a data grid view control? <br/><br/> <hr class=sig> -Nothing to see. Move along.Thu, 19 Nov 2009 17:07:15 Z2009-11-25T08:14:11Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/9d650c1d-ab65-41a3-a97f-bc07245ea28bhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/9d650c1d-ab65-41a3-a97f-bc07245ea28byacovrhttp://social.msdn.microsoft.com/Profile/en-US/?user=yacovrvb6 on windows7 :Right to Left property Hello <br/>I have Hebrew application in vb6 sp6 , i define the text property and forms to Right to Left =TRUE<br/>wen i intall the app on windows 7 <br/>all the text behave like LEFT TO RIGHT<br/><br/>the regional settings on windows7 is heberw <br/><br/>how to solve th problem<br/>best regards yacov<br/>Wed, 25 Nov 2009 08:12:09 Z2009-11-25T08:12:10Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/bc90b524-55d1-4089-a41c-aadcc2744ccdhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/bc90b524-55d1-4089-a41c-aadcc2744ccdRynhttp://social.msdn.microsoft.com/Profile/en-US/?user=RynNeed help to update source database - access <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">I am developing a VB.Net windows application to replace a legacy Access database. I started with the legacy database (.mdb) and made changed to tables (like deleting unused columns) and changing anniversaries from 3 columns (day, month, and year) to DataTime etc. I recognized the need to import data from the legacy system at the time when the new one goes live and wrote an import dialog to do this. And this is where my problem is. The importer correctly imports the data and writes new tables, but each time I restart the application I have the old data back. <span> </span></span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">This is the approach I took:</span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">In the load event I fill each tableadapter in the new (target) dataset as follows: </span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">Me</span><span style="font-family:'Courier New';font-size:10pt">.ClientInfoTableAdapter1.Fill(<span style="color:blue">Me</span>.DataSet1.ClientInfo)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">I Then populate a TreeView with nodes for each table name in the dataset by iterating the dataset</span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt 36pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">For</span><span style="font-family:'Courier New';font-size:10pt"> <span style="color:blue">Each</span> table <span style="color:blue">As</span> DataTable <span style="color:blue">In</span> DataSet1.Tables</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span><span style="color:blue">Dim</span> nm <span style="color:blue">As</span> <span style="color:blue">String</span> = table.TableName</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>          </span><span>  </span>TreeView1.Nodes.Add(nm)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>      </span><span style="color:blue">Next</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">The user can choose a legacy database (.mdb file) using an OpenfileDialog, then ticks the tables (in the TreeView) that should be imported and presses the import button.</span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">At this stage my code iterates the Treeview for each checked table name it instantiates a datatable as follows:</span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt">‘get a connection string to (source) legacy database</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">Dim</span><span style="font-family:'Courier New';font-size:10pt"> fromConnection <span style="color:blue">As</span> <span style="color:blue">String</span> = GetFromConnection() </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt">DataSet1.EnforceConstraints = <span style="color:blue">False</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>    </span><span>  </span><span style="color:blue">For</span> <span style="color:blue">Each</span> nd <span style="color:blue">As</span> TreeNode <span style="color:blue">In</span> TreeView1.Nodes</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span><span style="color:blue">If</span> nd.Checked <span style="color:blue">Then</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                </span><span style="color:blue">Dim</span> tbl <span style="color:blue">As</span> DataTable = DataSet1.Tables(nd.Text)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                </span>ImportTable(fromConnection, tbl)</span></p> <p class=MsoNormal style="text-indent:36pt;margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">Next</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span>DataSet1.EnforceConstraints = <span style="color:blue">True</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">If</span><span style="font-family:'Courier New';font-size:10pt"> tbl.HasErrors <span style="color:blue">Then</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>  </span>‘handle errors </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">Else</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>   </span>‘<span style="color:green"> If no errors, AcceptChanges.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>    </span>tbl.AcceptChanges()</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">End</span><span style="font-family:'Courier New';font-size:10pt"> <span style="color:blue">If</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">The ImportTable method looks like this:</span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">Public</span><span style="font-family:'Courier New';font-size:10pt"> <span style="color:blue">Sub</span> ImportTable(<span style="color:blue">ByVal</span> conn <span style="color:blue">As</span> <span style="color:blue">String</span>, <span style="color:blue">ByVal</span> tbl <span style="color:blue">As</span> DataTable)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt 48pt"><span style="font-family:'Courier New';color:green;font-size:10pt">'tbl is destination table to update, conn is the source connection string</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:green;font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span>Table_Label.Text = tbl.TableName</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span><span style="color:blue">Using</span> connection <span style="color:blue">As</span> <span style="color:blue">New</span> OleDbConnection(conn)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span>connection.Open()</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span>tbl.Clear()</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span>ProgressBar1.Value = 0</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span><span style="color:blue">Select</span> <span style="color:blue">Case</span> tbl.TableName</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                </span><span style="color:blue">Case</span> <span style="color:#a31515">&quot;ClientInfo&quot;</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:green">'</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                  </span><span>  </span><span style="color:green">'handle New Clientinfo table changes</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span>Import_ClientInfo(tbl, connection)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                  </span>. . . </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                </span><span style="color:blue">Case</span> <span style="color:blue">Else</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:green">'</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:green">'do generic (unchanged table) import</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span>Import_Generic(tbl, connection)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span><span style="color:blue">End</span> <span style="color:blue">Select</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span><span style="color:blue">End</span> <span style="color:blue">Using</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span> </span><span style="color:blue">End</span> <span style="color:blue">Sub</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">In the actual import method I use a reader to get the legacy data (in rows). I clear the destination table and add new rows to it (changing some data fields in the iteration. The following is an example:</span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">Private</span><span style="font-family:'Courier New';font-size:10pt"> <span style="color:blue">Sub</span> Import_ClientInfo(<span style="color:blue">ByVal</span> tbl <span style="color:blue">As</span> DataTable, <span style="color:blue">ByVal</span> conn <span style="color:blue">As</span> OleDbConnection)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt 48pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">Dim</span><span style="font-family:'Courier New';font-size:10pt"> t <span style="color:blue">As</span> ClientInfoDataTable = <span style="color:blue">CType</span>(tbl, ClientInfoDataTable)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt 48pt"><span style="font-family:'Courier New';color:green;font-size:10pt">'count rows and setup progress bar, also use it to verify rows</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span>SetmaxRows(<span style="color:#a31515">&quot;ClientInfo&quot;</span>, conn)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span><span style="color:blue">Dim</span> reader <span style="color:blue">As</span> OleDbDataReader = GetReader(conn, <span style="color:#a31515">&quot;SELECT * FROM ClientInfo&quot;</span>)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">If</span><span style="font-family:'Courier New';font-size:10pt"> reader <span style="color:blue">IsNot</span> <span style="color:blue">Nothing</span> <span style="color:blue">Then</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>  </span><span>  </span>Dim</span><span style="font-family:'Courier New';font-size:10pt"> index <span style="color:blue">As</span> <span style="color:blue">Integer</span>() = GetOrdinals(t, reader)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:green;font-size:10pt">'these columns have been changed </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:green;font-size:10pt">'birthday was stored in 3 columns (d, m, y); is now one date column</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>   </span><span> </span><span style="color:blue">Dim</span> di <span style="color:blue">As</span> <span style="color:blue">Integer</span> = reader.GetOrdinal(<span style="color:#a31515">&quot;ClientBirthdayDay&quot;</span>)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>    </span><span style="color:blue">Dim</span> mi <span style="color:blue">As</span> <span style="color:blue">Integer</span> = reader.GetOrdinal(<span style="color:#a31515">&quot;ClientBirthdayMonth&quot;</span>)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>   </span><span> </span><span style="color:blue">Dim</span> yi <span style="color:blue">As</span> <span style="color:blue">Integer</span> = reader.GetOrdinal(<span style="color:#a31515">&quot;ClientBirthdayYear&quot;</span>)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>   </span><span> </span><span style="color:blue">Dim</span> bd <span style="color:blue">As</span> <span style="color:blue">Integer</span> = t.ClientBirthdayColumn.Ordinal</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>   </span><span style="color:green">'these column names have changed</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>   </span><span> </span><span style="color:blue">Dim</span> si <span style="color:blue">As</span> <span style="color:blue">Integer</span> = reader.GetOrdinal(<span style="color:#a31515">&quot;ClientSex&quot;</span>)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>   </span><span> </span><span style="color:blue">Dim</span> gi <span style="color:blue">As</span> <span style="color:blue">Integer</span> = t.ClientGenderColumn.Ordinal</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>   </span><span> </span>index(gi) = si</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span><span style="color:green">'these are new columns</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span><span style="color:blue">Dim</span> pi <span style="color:blue">As</span> <span style="color:blue">Integer</span> = t.IsPersonColumn.Ordinal</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span><span style="color:blue">If</span> reader.HasRows <span style="color:blue">Then</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                </span><span style="color:blue">While</span> reader.Read()</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:green">'</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:green">' Create a new DataRow.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:blue">Dim</span> row <span style="color:blue">As</span> ClientInfoRow</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span>row = <span style="color:blue">CType</span>(t.NewRow(), ClientInfoRow)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt 120pt"><span style="font-family:'Courier New';color:green;font-size:10pt">'set all new fields &quot;IsPerson = True&quot;</span><span style="font-family:'Courier New';font-size:10pt"><span>                    </span>row(pi) = <span style="color:blue">True</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:green">'</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:green">'convert the day, month, year values to a date</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span>row(bd) = Convert_Date(reader, di, mi, yi)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span> </span><span>                   </span><span style="color:green">'</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span><span style="color:green">'fill the other matching columns</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span>FillMatchingColumns(t, reader, index, row)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                    </span>t.Rows.Add(row)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>                </span><span style="color:blue">End</span> <span style="color:blue">While</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span><span style="color:blue">End</span> <span style="color:blue">If</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>            </span>reader.Close()</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span><span style="color:blue">End</span> <span style="color:blue">If</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>    </span><span style="color:blue">End</span> <span style="color:blue">Sub</span></span><span><span style="font-size:small"><span style="font-family:Times New Roman"> </span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">On completion of this table control returns to the Import method which does a </span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt">tbl.AcceptChanges()</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">and on when the user is done the ‘OK_Button’ method of the dialog does a </span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">Me</span><span style="font-family:'Courier New';font-size:10pt">.TableAdapterManager1.UpdateAll(DataSet1)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">before closing. </span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-family:Times New Roman;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><span style="font-size:small"><span style="font-family:Times New Roman">Next time I run the application the imported changes are not there. What am I doing wrong? Obviously I have omitted code above to simplify the examples, but the concept is shown. Can someone please help me?</span></span></span></p> <hr class=sig> Ryn<hr class="sig">RynMon, 23 Nov 2009 14:08:14 Z2009-11-25T08:00:21Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/5911bdf9-eacb-43b6-8f94-490e60f2f668http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/5911bdf9-eacb-43b6-8f94-490e60f2f668Toinkhttp://social.msdn.microsoft.com/Profile/en-US/?user=ToinkMeasuring DataHi!<br/> <br/> Just want to ask if its possible for me to measure how many bytes of data does a device sent to my computer using vb.net? <br/> <br/> ThanksWed, 25 Nov 2009 07:50:03 Z2009-11-25T07:50:03Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/9f425f8b-4d13-4f34-b023-a0958c25bb22http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/9f425f8b-4d13-4f34-b023-a0958c25bb22MBarleyhttp://social.msdn.microsoft.com/Profile/en-US/?user=MBarleyDataSet Thread-Safety?<p><font face="Courier New, Courier, Monospace">I have a multi-threaded application with several datasets that are read/written to from a couple threads.  I have read that datasets can handle multiple readers and one writer.  I have synclocks around all dataset writes and no synchronization around reads.  I am experiencing random &quot;Index was outside the bounds of the array.&quot; exceptions where a dataset item is in a conditional statement, for example:</font></p><font color="#0000ff" size=2> <p>If</font><font size=2> </font><font color="#0000ff" size=2>CInt</font><font size=2>(CMPDAT.Tables(0).Rows(i).Item(&quot;ID&quot;)) = 0 </font><font color="#0000ff" size=2>Then</font></p> <p><font face="Tahoma,Helvetica,Sans-Serif" color="#000000" size=2>Do I need to synchronize read operations as well?</font></p> <p><font color="#0000ff" size=2><font face="Tahoma,Helvetica,Sans-Serif" color="#000000">Any help would be greatly appreciated.</font></p></font>Fri, 02 Feb 2007 02:28:43 Z2009-11-25T07:44:36Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/a6dbc7e6-a59d-424f-986f-4fd5555f16dbhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/a6dbc7e6-a59d-424f-986f-4fd5555f16dbapalcerhttp://social.msdn.microsoft.com/Profile/en-US/?user=apalcerFaxServer on Vista and Windows 7I wrote a fax server obj that worked on windows xp. When it got moved a windows 7 machine, it does not work. What changed? <br/><br/><span style="font-size:x-small"> <p>One issue is...<br/><span style="font-size:x-small"> <p>FaxServerObj.Folders.IncomingArchive.GetMessages(Fetch)  ... this appears not to work because it is not reading any of the files. <br/><br/>Any help or suggestion would awsome. <br/><br/>Thanks<br/>apalcer</p> </span></p> </span>Tue, 24 Nov 2009 19:09:16 Z2009-11-25T07:32:59Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/5be31469-b2a6-4672-b776-828e8ee11cd9http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/5be31469-b2a6-4672-b776-828e8ee11cd9iakovlev95http://social.msdn.microsoft.com/Profile/en-US/?user=iakovlev95Please help!<span class="medium_text"><span title="Пожалуйста Помогите!!!">Please Help!<br/> </span> <span title="подскажите как сделать чтобы форма перемещалась за клиентскую область">'ll show how to do that the form was moved to client area<br/> </span> <span title="я уже пробовал через :">I have tried via:<br/> </span> <span title="Вставить фрагмент/">Insert a piece /<br/> </span> <span title="но появляется ошибка.">but error.<br/> </span> <span title="ПОМОГИТЕ ПОЖАЛУЙСТА!!!">HELP PLEASE! </span> <span title="НЕ ЗНАЮ ЧТО ДЕЛАТЬ!!!">DO NOT KNOW WHAT TO DO!</span> </span>Wed, 25 Nov 2009 06:31:55 Z2009-11-25T07:24:48Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6d5e29ed-6ba9-4529-8742-46b83a8c7ffahttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6d5e29ed-6ba9-4529-8742-46b83a8c7ffajcsamhttp://social.msdn.microsoft.com/Profile/en-US/?user=jcsamTransaction Question (vb.net 2008)<div>Good Morning All,<br/><br/>I'm trying to run a transaction and I'm having some issues. What would cause a query to be executed before the transaction.commit() is called? Is there a specifice order that queries should be ran when working with a transaction? I have 1 update query that will always execute no matter what, before the .commit() is called. What would cause this?<br/><br/>Here's my code:<br/><br/>Dim myConnection As New MySqlConnection(myConnString) <br/>myConnection.Open() <br/><br/>Dim myCommand As MySqlCommand = myConnection.CreateCommand() <br/>Dim myTrans As MySqlTransaction <br/><br/>' Start a local transaction<br/>myTrans = myConnection.BeginTransaction() <br/>     <br/>' Must assign both transaction object and connection <br/> ' to Command object for a pending local transaction <br/> myCommand.Connection = myConnection <br/> myCommand.Transaction = myTrans <br/><br/>Try <br/><br/>     myCommand.CommandText = sQry1 'Insert query<br/>     myCommand.ExecuteNonQuery() <br/><br/>     myCommand.CommandText = sQry2 'Update query with 3 conditions Where-And-And<br/>     myCommand.ExecuteNonQuery() 'Always executes no matter what(not supposed to)<br/><br/>     myTrans.Commit() <br/><br/>Catch e As Exception <br/>'I have code here but removed so it can be easliy read. <br/>End Try <br/><br/><br/>Thanks in advance....<br/><br/>jb</div> Thu, 19 Nov 2009 16:59:32 Z2009-11-25T06:22:49Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/8dc11315-518a-4a9f-8e10-a0b266c0f54bhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/8dc11315-518a-4a9f-8e10-a0b266c0f54bdogpound12345http://social.msdn.microsoft.com/Profile/en-US/?user=dogpound12345VB 2005<p>I am trying to uninstall VB express 2005 but keep getting an error that it can not complete. I have looked but could not find a place to reinstall to see if after that it will let me then uninstall it like many have suggested but can not locate an install place. I am trying to get it removed to see if it will then let me install SQL 2008 on my computer.</p>Thu, 19 Nov 2009 19:40:27 Z2009-11-25T06:19:18Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/edf969b1-8407-4253-92c5-bef92c96bf3dhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/edf969b1-8407-4253-92c5-bef92c96bf3dSygrienhttp://social.msdn.microsoft.com/Profile/en-US/?user=SygrienDeploying Connection StringHello,<br/>I have a problem in the deployment of the same application to different customers.<br/><br/>Each customer has a different server name, so I need to be able to change the connection string without recompiling the application.<br/>I have two issues :<br/>1) which is the file that should be changed (I find several)<br/>2) is this file always available at the customer after deployment ?<br/><br/>Let me explain a little more :<br/>1) In the directory of the project that contains the connection string, I find several &quot;looking-alike&quot; files :<br/>in the main directory, I find &quot;app.config&quot;<br/>in the bin/debug, I find &quot;xxxxx.vshost.exe.config&quot; and also &quot;xxxxx.dll.config&quot;<br/><br/>Should I tamper with the bin/debug files or stick to the obvious &quot;app.config&quot; ?<br/>Should I replace the connection string in the &quot;app.config&quot; file ? Manually ? Please help...<br/><br/>2) My application is in fact built with two levels :<br/>- the main program that manages the user interface,<br/>- the data-access program that contains the connection string<br/>Is this good programming ? Should I consider revisiting this ?<br/>Of course, the data-access program is compiled as a .dll. Since the connection string belongs to the data-access program, what happened to it ?<br/>I'm using Click-Once. Should I change deployment tool ?<br/>In the publishing directory, I see now my xxxxx.dll.deploy, but no connection string anywhere ??<br/>How may I change it for various customers ?<br/>Please help !!!<br/><br/>Thanks<br/>Tue, 24 Nov 2009 12:41:48 Z2009-11-25T07:29:06Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/e19e0698-a653-4295-9737-a038fa9c0fc1http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/e19e0698-a653-4295-9737-a038fa9c0fc1B. Manhttp://social.msdn.microsoft.com/Profile/en-US/?user=B.%20ManHow do I catch AD changes' events like password changesI am working on a personal project and I want to create a windows service (in VB.Net), that monitors changes in a local (on the same machine) Active Directory. Specifically I want to catch AD password changes so that I can update a database. There are some applications that do this so I know it is possible. Any help will be most appreciated.<img style="border:medium none;z-index:2147483647" alt="" width=24 height=24>Tue, 24 Nov 2009 18:17:46 Z2009-11-25T06:12:21Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/1b3fbffe-2b2c-44b3-b1fd-7d8be04cf5d4http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/1b3fbffe-2b2c-44b3-b1fd-7d8be04cf5d4awsxdrcftvgyhttp://social.msdn.microsoft.com/Profile/en-US/?user=awsxdrcftvgyRestroe mysql Database using vb.net<p>here is my code that is use to restore mysql database using vb.net<br/><br/>but it is not working. i don`t unerstand what happend. please help me <br/><br/><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>Dim</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="font-size:x-small"> process </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">As</span></span><span style="font-size:x-small"> </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">New</span></span><span style="font-size:x-small"> Process<font size=2> <p>process.StartInfo.FileName =</p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql.exe&quot;</span></span></p> <span style="font-size:x-small"><font size=2> <p>process.StartInfo.Arguments =</p> </font></span> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;-u root -p123456 &lt; c:\player.sql&quot;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small">process.StartInfo.UseShellExecute = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">False</span></span></p> <span style="font-size:x-small"><font size=2> <p>process.StartInfo.RedirectStandardInput =</p> </font></span> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">True</span></span></p> <span style="font-size:x-small"><font size=2> <p>process.StartInfo.RedirectStandardOutput =</p> </font></span> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">True</span></span></p> <span style="font-size:x-small"><font size=2> <p>process.StartInfo.CreateNoWindow =</p> </font></span> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">True</span></span></p> <span style="font-size:x-small"> <p>process.Start()</p> <font size=2> <p>process.StandardInput.Write(</p> </font></span> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;root&quot;</span></span><span style="font-size:x-small">) <p>TextBox1.Text = process.StandardOutput.ReadToEnd</p> <p>process.WaitForExit()<br/><br/><br/>thank u</p> </span></p>Wed, 25 Nov 2009 04:21:53 Z2009-11-25T05:56:56Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/e28abf33-2005-44ef-a35e-6f52a90d4507http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/e28abf33-2005-44ef-a35e-6f52a90d4507giants00http://social.msdn.microsoft.com/Profile/en-US/?user=giants00save textbox to disk in VB.NET?<p>Hi I am wondering how to save a textbox contents to disk??  Using the MSDN help I was able to come up with this code so far.  I have a menu strip item labled &quot;save as.&quot;  when I click it the prompt to allow you to pick a location to save comes up and it will save a text file to the selected location but the .txt file is blank.  How do I set this code so that it knows to save the contents of the textbox.  Thanks!!</p> <p>        Dim saveFileDialog1 As New SaveFileDialog()<br/>        saveFileDialog1.Filter = &quot;Text|*.txt&quot;<br/>        saveFileDialog1.Title = &quot;Save File As&quot;<br/>        saveFileDialog1.ShowDialog()</p> <p>        If saveFileDialog1.FileName &lt;&gt; &quot;&quot; Then<br/>            Dim fs As System.IO.FileStream = CType _<br/>               (saveFileDialog1.OpenFile(), System.IO.FileStream)<br/>            fs.Close()<br/>        End If</p>Tue, 24 Nov 2009 23:29:21 Z2009-11-25T05:52:51Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/797cc254-0821-4525-ae8b-54fcf0f94dd0http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/797cc254-0821-4525-ae8b-54fcf0f94dd0ga630sfhttp://social.msdn.microsoft.com/Profile/en-US/?user=ga630sfVB.net 2008 setup and deployment attempts to install Sql Server 2008 Express, when Sql Server 2008 enterprise installed<p>Firstly. I posted this earlier but am unable to find it, so I am posting again<br/><br/>My VB.net 2008 windows forms app, setup and deployment project attempts to install SQL Server 2008 Express even though SQL Server 2008 Enterprise is already installed<br/><br/>How do I prevent this<br/><br/>I only want to install SQL Server Express 2008 when no other version of SQL Server 2008 is currently installed<br/><br/>Regards<br/>Steve</p>Wed, 25 Nov 2009 03:52:27 Z2009-11-25T05:50:24Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c6d9a056-14c1-4cb3-9c52-bfc94c2e5eb6http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c6d9a056-14c1-4cb3-9c52-bfc94c2e5eb6clzanashttp://social.msdn.microsoft.com/Profile/en-US/?user=clzanassave a button's coordinates to the databaseHi guys,<br/> <br/> Currently for the drag and drop button at run time, i am saving the button's coordinates and button text to the text file named button.text.<br/> <br/> the below is the code for it. <br/> <br/> <pre lang=x-vbnet> Using SW As New IO.StreamWriter(IO.Path.Combine(Application.StartupPath, &quot;Buttons.txt&quot;), False) For Each C As Control In PictureBox1.Controls If TypeOf C Is BlinkButton Then If C.Tag = &quot;NewBTN&quot; Then Dim Btn As BlinkButton = CType(C, BlinkButton) SW.WriteLine(Btn.Text &amp; &quot;,&quot; &amp; _ Btn.Location.X &amp; &quot;,&quot; &amp; _ Btn.Location.Y) End If End If Next SW.Flush() SW.Close() End Using</pre> so now i'm actually trying to change the above method to saving the location and the button text in the database instead of the text file but i'm getting the error saying that there is object reference error. <br/> <br/> I think the database cant save the button x and y coordinates in. Do any one have a idea how to do using the database method?<br/> <br/> I am using this method to save the button coordinates and text in. The method is somewhat like  the insert dsnewrow.<br/> <br/> the method is below<br/> <br/> <pre lang=x-vbnet> dsNewRow.Item(&quot;button_text&quot;) = BTN.Text dsNewRow.Item(&quot;button_text&quot;) = BTN.Location.X dsNewRow.Item(&quot;button_text&quot;) = BTN.Location.Y ds3.Tables(&quot;Coordinates&quot;).Rows.Add(dsNewRow) da3.Update(ds3, &quot;Coordinates&quot;) </pre> <br/> <br/> and the error points to the btn.text.<br/> <br/> hope some one can help me with this as i'm new to VB.<br/> <br/> Cheers!!<br/> <br/>Tue, 24 Nov 2009 13:47:59 Z2009-11-25T05:38:36Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7f468303-a75e-4e25-82cf-9495836c4f22http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7f468303-a75e-4e25-82cf-9495836c4f22Jaslinhttp://social.msdn.microsoft.com/Profile/en-US/?user=JaslinRole based menuHow to enable / disable menu items based on allowed security roles specified for an item.Mon, 23 Nov 2009 12:04:29 Z2009-11-25T05:24:08Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4714c7f0-69e5-4633-8f3f-7c6054fa5b9bhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4714c7f0-69e5-4633-8f3f-7c6054fa5b9bMeetPhttp://social.msdn.microsoft.com/Profile/en-US/?user=MeetPreturn values to the calling formI have a form which calls other form to achieve some functionality. How can I pass values obtained on other form to the calling form?Tue, 24 Nov 2009 05:09:15 Z2009-11-25T04:09:07Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/771f13e7-f798-478f-a781-260f816fe734http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/771f13e7-f798-478f-a781-260f816fe734Davidnewbhttp://social.msdn.microsoft.com/Profile/en-US/?user=DavidnewbUnable to retain data in DataRepeaterHi,<br/><br/>I am manully adding data to DataRepeater, but once scrolling up and down, the data is vanished. <br/>I have only a text box in the item template. Can any  one see what's wrong?<br/><br/>DataRepeater1.AddNew()<br/>DataRepeater1.CurrentItem.Controls(&quot;txt1&quot;).text=&quot;yehaa&quot;Tue, 24 Nov 2009 07:04:41 Z2009-11-25T02:44:00Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c7cf0a07-9bf7-4a7a-aae9-72f0b921a696http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c7cf0a07-9bf7-4a7a-aae9-72f0b921a696eifadanhttp://social.msdn.microsoft.com/Profile/en-US/?user=eifadanHow To Change Code For Communication USB Port in VB6 to VB.NET?I have 1 project to comunication with usb port in VB.NET.But now,i have code VB6 and then i want to change the code VB6 to VB.NET.can any body to help me for change the code to VB.NET?please email: <a href="mailto:eifadan_89@yahoo.com.my">eifadan_89@yahoo.com.my</a><br/>This is code in VB6:<br/><br/>    Dim id As Integer<br/>    Dim status As Integer<br/>    Dim res As Integer<br/>    Dim buf As String * 100<br/>    Dim result As Long<br/>    Dim setting As Long<br/>    Dim strres As String * 80<br/>    Dim actual As Long<br/>    Dim datalen As Long<br/>    Dim retcnt As Integer<br/>    Dim siclAddr As String<br/>    Dim info As usbinfo<br/>    Dim capinfo As usbcapinfo<br/>    <br/>    ' Change the value of siclAddr to refer to the USB device of<br/>    ' your choice.  Note that for simplicity, we are using an<br/>    ' alias name rather than the much longer standard open string.<br/>    ' Consult the Agilent Connectivity Expert for the interface names<br/>    '    and instrument addresses on your PC.<br/>    siclAddr = &quot;USB1&quot;<br/>    <br/>    strres = &quot; &quot;<br/>    buf = &quot;SENS:DIG:DATA:BYTE? (@101)&quot; + Chr$(10)<br/>     datalen = Len(&quot;SENS:DIG:DATA:BYTE? (@101)&quot; + Chr$(10))<br/> '   datalen = Len(buf)<br/>    id = iopen(siclAddr)<br/>    status = iwrite(id, buf, datalen, 1, 0&amp;)<br/>    status = iread(id, strres, 80, 0&amp;, actual)<br/>    'MsgBox &quot;Result is: &quot; + strres, vbOKOnly, &quot;Channel Input&quot;<br/>    <br/>    status = iclose(id)<br/>    Label5.Caption = strresWed, 25 Nov 2009 00:57:09 Z2009-11-25T02:23:32Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/cdd6f53e-0140-41ef-ad13-be2a8e20cc6ahttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/cdd6f53e-0140-41ef-ad13-be2a8e20cc6aDavidldwhttp://social.msdn.microsoft.com/Profile/en-US/?user=DavidldwHow to change this VB cord to VB.net cord<p align=left><font face=Arial size=2></font> </p><font color="#0000ff" size=2></font> <p><font color="#0000ff" size=2>Option</font><font size=2> </font><font color="#0000ff" size=2>Strict</font><font size=2> </font><font color="#0000ff" size=2>Off</font></p> <p><font color="#0000ff" size=2>Option</font><font size=2> </font><font color="#0000ff" size=2>Explicit</font><font size=2> </font><font color="#0000ff" size=2>On</font></p> <p><font color="#0000ff" size=2>Friend</font><font size=2> </font><font color="#0000ff" size=2>Class</font><font size=2> util7260</font></p> <p><font color="#0000ff" size=2>Inherits</font><font size=2> System.Windows.Forms.Form</font></p> <p><font color="#0000ff" size=2>Dim</font><font size=2> status(7) </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Byte</font></p><font size=2></font> <p><font color="#0000ff" size=2>Dim</font><font size=2> do_data(1) </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Integer</font></p><font size=2></font> <p><font color="#0000ff" size=2>Private</font><font size=2> </font><font color="#0000ff" size=2>Sub</font><font size=2> DOP0_Click(</font><font color="#0000ff" size=2>ByVal</font><font size=2> eventSender </font><font color="#0000ff" size=2>As</font><font size=2> System.Object, </font><font color="#0000ff" size=2>ByVal</font><font size=2> eventArgs </font><font color="#0000ff" size=2>As</font><font size=2> System.EventArgs) </font><font color="#0000ff" size=2>Handles</font><font size=2> DOP0.Click</font></p> <p><font color="#0000ff" size=2>Dim</font><font size=2> Index </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font><font size=2> = DOP0.GetIndex(eventSender)</font></p> <p><font color="#0000ff" size=2>Dim</font><font size=2> v, i, d </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p><font color="#0000ff" size=2>Dim</font><font size=2> Port </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p><font size=2>Port = Fix(Index / 8)</font></p> <p><font size=2>d = 2 ^ (Index </font><font color="#0000ff" size=2>Mod</font><font size=2> 8)</font></p> <p><font color="#0000ff" size=2>If</font><font size=2> status(Index) = 1 </font><font color="#0000ff" size=2>Then</font></p><font size=2></font> <p><font size=2>do_data(Port) = do_data(Port) - d</font></p> <p><font size=2>DOP0(Index).Image = Image0.Image</font></p> <p><font size=2>status(Index) = 0</font></p> <p><font color="#0000ff" size=2>Else</font></p><font size=2></font> <p><font size=2>do_data(Port) = do_data(Port) + d</font></p> <p><font size=2>DOP0(Index).Image = Image1.Image</font></p> <p><font size=2>status(Index) = 1</font></p> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>If</font></p><font size=2></font> <p><font size=2>v = DO_WritePort(card, Port, do_data(Port))</font></p> <p></p> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>Sub</font></p><font size=2></font> <p></p> <p></p> <p><font color="#0000ff" size=2>Private</font><font size=2> </font><font color="#0000ff" size=2>Sub</font><font size=2> util7260_Load(</font><font color="#0000ff" size=2>ByVal</font><font size=2> eventSender </font><font color="#0000ff" size=2>As</font><font size=2> System.Object, </font><font color="#0000ff" size=2>ByVal</font><font size=2> eventArgs </font><font color="#0000ff" size=2>As</font><font size=2> System.EventArgs) </font><font color="#0000ff" size=2>Handles</font><font size=2> </font><font color="#0000ff" size=2>MyBase</font><font size=2>.Load</font></p> <p><font color="#0000ff" size=2>Dim</font><font size=2> i, result </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p><font size=2>SettingForm.ShowDialog()</font></p> <p><font color="#0000ff" size=2>If</font><font size=2> card &lt; 0 </font><font color="#0000ff" size=2>Then</font></p><font size=2></font> <p><font size=2>MsgBox(</font><font color="#800000" size=2>&quot;Register Card Failed&quot;</font><font size=2>)</font></p> <p><font color="#0000ff" size=2>End</font></p><font size=2></font> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>If</font></p><font size=2></font> <p><font color="#0000ff" size=2>For</font><font size=2> i = 0 </font><font color="#0000ff" size=2>To</font><font size=2> 7</font></p> <p><font size=2>status(i) = 0</font></p> <p><font color="#0000ff" size=2>Next</font><font size=2> </font></p> <p></p> <p><font size=2>do_data(0) = 0</font></p> <p></p> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>Sub</font></p><font size=2></font> <p></p> <p><font color="#0000ff" size=2>Private</font><font size=2> </font><font color="#0000ff" size=2>Sub</font><font size=2> util7260_FormClosed(</font><font color="#0000ff" size=2>ByVal</font><font size=2> eventSender </font><font color="#0000ff" size=2>As</font><font size=2> System.Object, </font><font color="#0000ff" size=2>ByVal</font><font size=2> eventArgs </font><font color="#0000ff" size=2>As</font><font size=2> System.Windows.Forms.FormClosedEventArgs) </font><font color="#0000ff" size=2>Handles</font><font size=2> </font><font color="#0000ff" size=2>Me</font><font size=2>.FormClosed</font></p> <p><font color="#0000ff" size=2>Dim</font><font size=2> result </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p><font color="#0000ff" size=2>If</font><font size=2> card &gt;= 0 </font><font color="#0000ff" size=2>Then</font></p><font size=2></font> <p><font size=2>result = Release_Card(card)</font></p> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>If</font></p><font size=2></font> <p><font color="#0000ff" size=2>End</font></p><font size=2></font> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>Sub</font></p><font size=2></font> <p></p> <p></p> <p><font color="#0000ff" size=2>Public</font><font size=2> </font><font color="#0000ff" size=2>Sub</font><font size=2> mnuExit_Click(</font><font color="#0000ff" size=2>ByVal</font><font size=2> eventSender </font><font color="#0000ff" size=2>As</font><font size=2> System.Object, </font><font color="#0000ff" size=2>ByVal</font><font size=2> eventArgs </font><font color="#0000ff" size=2>As</font><font size=2> System.EventArgs) </font><font color="#0000ff" size=2>Handles</font><font size=2> mnuExit.Click</font></p> <p><font color="#0000ff" size=2>Dim</font><font size=2> result </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p><font color="#0000ff" size=2>If</font><font size=2> card &gt;= 0 </font><font color="#0000ff" size=2>Then</font></p><font size=2></font> <p><font size=2>result = Release_Card(card)</font></p> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>If</font></p><font size=2></font> <p><font color="#0000ff" size=2>End</font></p><font size=2></font> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>Sub</font></p><font size=2></font> <p></p> <p><font color="#0000ff" size=2>Private</font><font size=2> </font><font color="#0000ff" size=2>Sub</font><font size=2> Timer1_Tick(</font><font color="#0000ff" size=2>ByVal</font><font size=2> eventSender </font><font color="#0000ff" size=2>As</font><font size=2> System.Object, </font><font color="#0000ff" size=2>ByVal</font><font size=2> eventArgs </font><font color="#0000ff" size=2>As</font><font size=2> System.EventArgs) </font><font color="#0000ff" size=2>Handles</font><font size=2> Timer1.Tick</font></p> <p><font color="#0000ff" size=2>Dim</font><font size=2> result </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p><font color="#0000ff" size=2>Dim</font><font size=2> di_data </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Integer</font></p><font size=2></font> <p><font color="#0000ff" size=2>Dim</font><font size=2> i </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p><font color="#0000ff" size=2>Dim</font><font size=2> p </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p><font color="#0000ff" size=2>Dim</font><font size=2> Port </font><font color="#0000ff" size=2>As</font><font size=2> </font><font color="#0000ff" size=2>Short</font></p><font size=2></font> <p></p> <p><font size=2>Port = 0</font></p> <p><font size=2>result = DI_ReadPort(card, Port, di_data)</font></p> <p><font color="#0000ff" size=2>For</font><font size=2> i = 0 </font><font color="#0000ff" size=2>To</font><font size=2> 7</font></p> <p><font size=2>p = di_data </font><font color="#0000ff" size=2>Mod</font><font size=2> 2</font></p> <p><font color="#0000ff" size=2>If</font><font size=2> p = 0 </font><font color="#0000ff" size=2>Then</font></p><font size=2></font> <p><font size=2>DI0(Port * 8 + i).Image = Image0.Image</font></p> <p><font color="#0000ff" size=2>Else</font><font size=2> </font><font color="#008000" size=2>'p = 1</font></p><font size=2></font> <p><font size=2>DI0(Port * 8 + i).Image = Image1.Image</font></p> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>If</font></p><font size=2></font> <p><font size=2>di_data = </font><font color="#0000ff" size=2>CShort</font><font size=2>(Int(di_data / 2))</font></p> <p><font color="#0000ff" size=2>Next</font><font size=2> </font></p> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>Sub</font></p> <p><font color="#0000ff" size=2>End</font><font size=2> </font><font color="#0000ff" size=2>Class</font></p>Wed, 30 Apr 2008 08:58:52 Z2009-11-25T01:32:43Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7a8f4c90-3d42-472e-b24a-218204f23159http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7a8f4c90-3d42-472e-b24a-218204f23159rsinehttp://social.msdn.microsoft.com/Profile/en-US/?user=rsineDynamic IF statements<p>I have a project that requires data from a csv file to be manipulated into a new csv file.  While some of the manipulation is simply straight mapping of data from the input csv to the output csv, the more complex part of the project is the dynamic IF statement requirement for some mappings.  For this, the project requires some mappings to execute a series of IF..THEN..ELSE statements but the kicker is the user should be in full control of these statements.  By full control, I mean each mapping should be visible to the user and he can add, subtract, or modify IF clauses per mapping.  Is this possible in .Net and if so, how would I go about doing it?  Examples are appreciated.</p> <p>-Thank you </p>Tue, 24 Nov 2009 18:39:50 Z2009-11-25T02:17:12Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4cc9c0a4-7293-4f76-bac6-4a897e99ca0ehttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4cc9c0a4-7293-4f76-bac6-4a897e99ca0eGAMinTNhttp://social.msdn.microsoft.com/Profile/en-US/?user=GAMinTNPrinting to LPT1 in vb.net 2003<p>I am writing a POS application using vb.net 2003 and need to print 3 or 4 lines of information (complete with formatting instructions) to an attached parallel printer.  Here are the specifics:<br/><br/>1.  Printer is a Practictical Automation CLTX2003 parallel thermal printer<br/>2.  Formatting instructions accomplished using Friendly Ghost Language (FGL)<br/>3.  No dialog boxes should open for user confirmation or input<br/>4.  Would prefer to print each line (with its formating instructions) directly to the printer<br/><br/>If there is someone who is able to help with the code (including all declarations) I would greatly appreciate it.  I have tried using Open &quot;LPT1:&quot; As #1 . . . . and all I get is several items shown as &quot;Undeclared&quot;.<br/><br/>Tired of going home with a headache!!!!</p>Tue, 10 Nov 2009 15:24:21 Z2009-11-25T00:13:22Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/87cddabc-dfbb-4e56-9fe6-ea6ba0b78f86http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/87cddabc-dfbb-4e56-9fe6-ea6ba0b78f86VBCoder60http://social.msdn.microsoft.com/Profile/en-US/?user=VBCoder60Visual Basic Application with Microsoft Sync Framework 2.0 ADO.NETI am creating a Visual Basic 2008 .net application that will be using the Sync Service for ADO.NET on Windows 7 Ultimate.  The back end database is SQL 2008.  Below are the basic steps I take when the error occurs<br/><br/>a.  Add a Local Database Cache item to my application<br/>b.  Use the Configure Data Synchronication wizard for the setup process<br/>c.  Click the OK button to accept changes<br/>d.  An error message is generated, &quot;The given key was not present in the dictionary&quot;.<br/><br/>I have attempted this several times and the error message presists no matter how I vary the options.  I have also installed Microsoft Sync Framework 2.0 successfully but the error persists.  I also have all the following Dlls referenced in my project:  <br/><br/>Microsoft.Synchronization.dll, <br/>Microsoft.Synchronization.Data.dll, <br/>Microsoft.Synchronization.Data.Server.dll, <br/>Microsoft.Synchronization.Data.SqlServer.dll, <br/>Microsoft.Synchronization.Data.SqlServerCe.dll.  <br/><br/>I am sure I don't need all of these references but I figured it does not hurt to have them all referenced for now. I have the latest OS service and Visual Studio 2008 service packs.<br/><br/>If you have any input please let me know.Tue, 24 Nov 2009 23:11:28 Z2009-11-24T23:11:29Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/f42eb501-587c-4003-8d6c-ed0aedf6e183http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/f42eb501-587c-4003-8d6c-ed0aedf6e183OuTa-SyNchttp://social.msdn.microsoft.com/Profile/en-US/?user=OuTa-SyNcDetect ODBC driver/connector is installedHi,<br/><br/>I currently connect to a MySQL database using the ODBC MySQL 5.1 Connector, how would I be able to detect if the driver is installed before a connection attempt?<br/><br/>Thank you for any assistance<br/><br/>Kind Regards,<br/>CarlTue, 24 Nov 2009 22:25:25 Z2009-11-24T23:08:04Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/d6e8cd41-aaa9-453f-9b1e-addb913df80fhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/d6e8cd41-aaa9-453f-9b1e-addb913df80fManagerJohnhttp://social.msdn.microsoft.com/Profile/en-US/?user=ManagerJohnBinding a Single Column to a DataGridViewAll;<br/> <br/> In previous versions (VB.NET 2003) I would do<br/> <br/>     datagrid.datasource = dataset.tables(0)<br/>     datagrid.datamember = &quot;Column1&quot;  'Where this is the name of the column<br/> <br/> This would show me just that column in the grid regardless of the number of columns in the dataset.<br/> <br/> In VB.NET 2008 I do:<br/> <br/>     datagridview1.datasource = dataset.tables(0)<br/> <br/> I see all the columns.<br/> <br/> I then add:<br/> <br/>     datagridview1.datamember = &quot;Column1&quot;  'Where Column1 is the column name<br/> <br/> I then have an empty grid.  How does one get only a single column to show in the grid from a multi-column data source?  I am using internal code to populate the datasets and tables. <br/> <br/> Many thanks.<br/> <br/> John FerryTue, 24 Nov 2009 21:36:07 Z2009-11-24T23:06:31Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/1a9eae61-206a-4bd7-9dcd-95b7d4254c8ehttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/1a9eae61-206a-4bd7-9dcd-95b7d4254c8eManrippohttp://social.msdn.microsoft.com/Profile/en-US/?user=ManrippoUnable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. <p>Does anyone know what the problem is with this error message?<br/><br/><br/><br/> <table style="height:100%" border=0 cellspacing=0 cellpadding=0 width="100%"> <tbody> <tr> <td style="letter-spacing:0px" width="8%" height=40 align=center bgcolor="#ff9999"><img border=0 alt=ErrorImage width=35 height=35></td> <td style="vertical-align:top;letter-spacing:0px" width="91%" height=40 align=left bgcolor="#ff9999"><strong><span style="font-size:x-small;font-family:Arial">One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.</span></strong></td> </tr> <tr> <td colspan=2 align=left valign=top> <div class=ErrorStyle><span style="font-weight:600"><br/>Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. </span><br/><a>Hide</a><span style="color:#0000ff">    </span></div> </td> </tr> <tr> <td colspan=2 align=left valign=top> <div class=StackStyleVisible><br/>at System.Reflection.Module._GetTypesInternal(StackCrawlMark&amp; stackMark)<br/>at System.Reflection.Assembly.GetTypes()<br/>at Microsoft.VisualStudio.Shell.Design.AssemblyObsoleteEventArgs..ctor(Assembly assembly)<br/>at Microsoft.VisualStudio.Design.VSDynamicTypeService.ReloadAssemblyIfChanged(String codeBase)<br/>at Microsoft.VisualStudio.Design.VSDynamicTypeService.CreateDynamicAssembly(String codeBase)<br/>at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()<br/>at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly&amp; assembly, String description)<br/>at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly&amp; assembly)<br/>at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)<br/>at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)<br/>at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)<br/>at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetType(String typeName)<br/>at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)<br/>at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)<br/>at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)<br/>at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)</div> </td> </tr> </tbody> </table> </p>Mon, 23 Nov 2009 14:43:35 Z2009-11-24T23:02:46Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/91aaf008-34eb-49c6-8b1a-436d6ab23a22http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/91aaf008-34eb-49c6-8b1a-436d6ab23a22ElBashahttp://social.msdn.microsoft.com/Profile/en-US/?user=ElBashaUsing .Replace to replacing an ampersandI am running the following code but it is not replacing it:<br/> <br/> <pre lang=x-vbnet> Dim stItemName As String = txt1.Text stItemName.Replace(&quot;&amp;&quot;, &quot;&quot;) txt2.Text = stItemName</pre> <br/> <br/> Any idea why? ThanksTue, 24 Nov 2009 22:26:00 Z2009-11-24T23:04:32Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/44be1e81-d82a-4cde-99db-c018850cf56fhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/44be1e81-d82a-4cde-99db-c018850cf56fKaretuNhttp://social.msdn.microsoft.com/Profile/en-US/?user=KaretuNUse VB.NET to retrieve SQL data.Hello everyone, i've come to the place where i don't know what to do, so i'm asking you. Preety much, i need help with my VB.NET application to be used with SQL. <br/>I will write here i want to do:<br/><br/>1. user writes he's details (textbox1 for username, textbox2 for password)<br/>2. user hits &quot;Login&quot;<br/>3. application tries to retrive data from sql server. (in this case localhost/127.0.0.1) <br/>4. application retrieves data from test/tables/members <br/>5. if the specified account information matches the servers data, it will let you through to the next form. Else, it will give an error that the user/pass is incorrect.<br/><br/>Now look, the table looks like this<br/><br/>[id] | [username] | [password]<br/> 1       username      password<br/><br/>OR look here at the picture: <a href="http://img697.imageshack.us/img697/2931/sqlsetup.png">http://img697.imageshack.us/img697/2931/sqlsetup.png</a> <br/><br/>Thanks for all help everyone!Mon, 23 Nov 2009 20:16:52 Z2009-11-24T22:40:15Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/13f84526-d785-4069-960d-dbc9ddb4becdhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/13f84526-d785-4069-960d-dbc9ddb4becdsqlserver_rohttp://social.msdn.microsoft.com/Profile/en-US/?user=sqlserver_roWindows Forms, Master-Detail insert errorI have one SQL Server database with two tables:<br/> <strong>CREATE TABLE [dbo].[Invoice]<br/> (<br/>     [IdInvoice] [int] IDENTITY(1,1) PRIMARY KEY,<br/>     [Customr] [varchar](50) NOT NULL,<br/>     [InvoiceDate] [smalldatetime] NOT NULL<br/> );<br/> <br/> CREATE TABLE [dbo].[InvoiceDetails]<br/> (<br/>     [IDInvoiceDetails] [int] IDENTITY(1,1) PRIMARY KEY,<br/>     [IdInvoice] [int] NULL REFERENCES Invoice(IDInvoice),<br/>     [ProductName] [nvarchar](50) NOT NULL,<br/>     [Q] [int] NOT NULL,<br/>     [UnitPrice] [int] NOT NULL<br/> );<br/> </strong> <br/> <br/> <br/> My VB 2008 Windows Forms project have:<br/> - one dataset with this two table plus InvoiceDetails.IdInvoice (FK) -&gt; Invoice.IdInvoice (PK) relationship,<br/> - Form1 with some TextBoxe's linked to master table: Invoice,<br/> - Form1 with one DataGridView linked to Invoice.InvoiceDetails (relationship from Invoice),<br/> - xxxBindingSource and xxxTableAdapter and TableAdapterManager components.<br/> <br/> Form1 works fine if I want to update data.<br/> <br/> Source code for saving data in Form1:<br/> <strong>Me.Validate()<br/> <br/> Me.FacturaBindingSource.EndEdit()<br/> Me.FacturaTableAdapter.Update(Me.TestDataSet.Factura)<br/> <br/> Me.ProdusFacturatBindingSource.EndEdit()<br/> Me.ProdusFacturatTableAdapter.Update(Me.TestDataSet.ProdusFacturat)<br/> </strong> <br/> <br/> <br/> Problem: when I want to insert data in  Invoice &amp; InvoiceDetails tables I receive the next error:<br/> <strong>The INSERT statement conflicted with the FOREIGN KEY constraint &quot;FK_InvoiceDetails_Invoice&quot;. Th conflict occurred in database &quot;Test&quot;, table &quot;dbo.Invoice&quot;, column &quot;IdInvoice&quot;.</strong> <br/> <br/> Invoice.IdInvoice field have INT datatype with <strong>IDENTITY(1,1) property</strong> .<br/> <br/> Thank you,<br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>Mon, 23 Nov 2009 13:50:12 Z2009-11-24T22:31:29Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/756e17d5-001a-4529-84b4-fbf0213f3077http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/756e17d5-001a-4529-84b4-fbf0213f3077Flutophilushttp://social.msdn.microsoft.com/Profile/en-US/?user=FlutophilusSQL Bulk Copy Timeout Hi, I'm using sqlbulkcopy to load data into a sql2008 database, and we're getting timeout errors loading larger tables. Some tables which were loading OK are failing since indexes have been added to them. The source data is a Informix datareader. I've tried setting large values in both the connection timeout and the sqlbulkcopy.bulkcopytimeout, but the timeout usually occurs within 60 seconds, well below the timeout values I've set (240 secs). I've tried setting the .bulcopytimeout property to zero but it makes no difference. Very occasionally a load will take place - the last large table to load took 7 minutes. <br/><br/>So I suspect the problem is somewhere else - any clues gratefully received - here's the code. I've reduced the batch size to 500.<br/><br/>The documentation on bulkcopytimeout that I have found does not describe what the property actually means - is it the maximum time to complete the entire copy or to complete one batch or what ?<br/><br/>Here's some extracts from my error log - the first shows a successful large table load, follow by timeout failures.<br/><br/>24/11/2009 10:59:01<br/>Level : Information<br/>MISLoad - Starting load from Mach4 to ParagonMIS of all selected tables <br/>---------------------------------------<br/>24/11/2009 11:07:38<br/>Level : Warning<br/>MISLoad - table load warning.<br/>Row count mismatched for stockmove - 4730598 rows read, 4730627 rows written<br/>---------------------------------------<br/>24/11/2009 11:07:38<br/>Level : SuccessAudit<br/>MISLoad - Successful load from Mach4 to ParagonMIS of all selected tables <br/><br/>24/11/2009 11:09:46<br/>Level : Information<br/>MISLoad - Starting load from Mach4 to ParagonMIS of all selected tables <br/>---------------------------------------<br/>24/11/2009 11:10:17<br/>Level : Error<br/>MISLoad - table load failed.<br/>Microsoft SQL Server Exception in MISLoadClasses.BulkCopy of table poline - <br/>System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.<br/>   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)<br/>   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)<br/>   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)<br/>   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)<br/>   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)<br/>   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)<br/>   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()<br/>   at MISLoadClasses.BulkCopy.LoadData(String TableName, Int32 intBulkCopyTimeout, Int32 intBulkCopyBatchSize)<br/>---------------------------------------<br/>24/11/2009 11:10:52<br/>Level : Error<br/>MISLoad - table load failed.<br/>Microsoft SQL Server Exception in MISLoadClasses.BulkCopy of table wodet - <br/>System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.<br/>   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)<br/>   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)<br/>   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)<br/>   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)<br/>   at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()<br/>   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()<br/>   at System.Data.SqlClient.TdsParserStateObject.ReadByte()<br/>   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)<br/>   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)<br/>   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)<br/>   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()<br/>   at MISLoadClasses.BulkCopy.LoadData(String TableName, Int32 intBulkCopyTimeout, Int32 intBulkCopyBatchSize)<br/>---------------------------------------<br/><br/>Here's the core of the code - I'm setting the bulktimeout and batch sizes using parameters that are set by the user and passed in to this routine - this routine is within a loop that passes the names of the tables to load.<br/><br/><span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Using</span></span><span style="font-size:x-small"> bulkCopy </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">As</span></span><span style="font-size:x-small"> SqlBulkCopy = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">New</span></span><span style="font-size:x-small"> SqlBulkCopy(GlobalData.misDbConnectString, SqlBulkCopyOptions.TableLock) <p>bulkCopy.BatchSize = intBulkCopyBatchSize</p> <font size=2> <p>bulkCopy.DestinationTableName =</p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;dbo.&quot;</span></span><span style="font-size:x-small"> &amp; TableName <p>bulkCopy.BulkCopyTimeout = intBulkCopyTimeout</p> <font size=2> <p> </p> </font></span></p> <p><span style="color:#008000;font-size:x-small"><span style="color:#008000;font-size:x-small">' Write from the source to the destination.</span></span></p> <span style="font-size:x-small"> <p>bulkCopy.WriteToServer(reader2)</p> <font size=2> <p> </p> </font></span> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">End</span></span><span style="font-size:x-small"> </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Using<br/><br/></span></span></p>Tue, 24 Nov 2009 16:56:55 Z2009-11-24T22:03:50Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/f5eb1c68-7c2f-4437-b46a-856e921e4cbchttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/f5eb1c68-7c2f-4437-b46a-856e921e4cbcAng Bainhttp://social.msdn.microsoft.com/Profile/en-US/?user=Ang%20BainAsync web service call within console app problem<p>I have a console app that is supposed to async call a web service...i don't get any errors but the completed handler doesn't seem to complete correctly. I have a subroutine with a loop that is supposed to fire off say 6 seperate calls to another routine that calls the service. The completed event handler routine puts data into the database..If i put a thread.sleep under the call to the routine calling the web service. The completed event handler fires but only one record is put in the database instead of the hundreds expected and only that one webservice call appears to fire...<br/><br/>I should mention that this works as expected when calling the sync method of the web service within a console app and the asyc calls work as expected from a windows forms app. <br/><br/>I just need it to work async within a console app..</p> <p>Please help as im tearing my hair out...</p> <p>thanks Ang</p><hr class="sig">angTue, 24 Nov 2009 22:00:06 Z2009-11-24T22:00:07Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/bfd7b574-d99b-4020-81d8-87e18435254chttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/bfd7b574-d99b-4020-81d8-87e18435254cAlla2552http://social.msdn.microsoft.com/Profile/en-US/?user=Alla2552DatePicker doesn't display binding data correctlyI have a VB 2008 application with multiple DataPicker fields. The data is binded to SQL database. On the form load I set the checkBox for each date to false if there is no date in the field. Noticed that if I make changes to some dates for record 1 in the table, save it and scroll to the next record - I see the date that I just changed for record 1 - also on records 2 and 3. Why is it happening? I don't have that problem if I use text fields to display the dates. Is there some steps that I'm missing?<br/>I had encountered the same problem with different project and just switched to text boxes. With this new project - thought I'd give it another try - may be there is a simple way to fix it. Thanks!Mon, 23 Nov 2009 21:38:21 Z2009-11-24T21:58:43Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6fa2e5a2-e8f4-4ac3-a54b-f44ff2f2cad6http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6fa2e5a2-e8f4-4ac3-a54b-f44ff2f2cad6randywheelerhttp://social.msdn.microsoft.com/Profile/en-US/?user=randywheelerVB.Net SQL SubqueryI need to design an SQL query based on the following, but I can't seem to see it in my head.<br/><br/>Table1<br/>CustomerID    CustomerInfo<br/><br/>Table2<br/>CustomerID    RecordID     DateTime<br/><br/>Table3<br/>CustomerID    RecordID     ProductID     Quantity<br/><br/>Given a certain CustomerID, I want to individually sum the product quantities in Table3 based on the records in Table2 that are within a range of dates.<br/><br/>I think I can do this with subqueries, but am having trouble with the design.Mon, 23 Nov 2009 17:24:12 Z2009-11-24T21:31:41Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/ec0de8cb-07a6-4ea2-a3b7-905a243408bfhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/ec0de8cb-07a6-4ea2-a3b7-905a243408bfMeetPhttp://social.msdn.microsoft.com/Profile/en-US/?user=MeetPProperty of DataGridView Control for adjusting column width as per the data populationOnce I read the property for DataGridView Column which allows Grid Column to adjust as per the data width. I can not recall it or find it.<br/> <br/> Do you know that property?Tue, 24 Nov 2009 19:10:04 Z2009-11-24T21:22:57Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/9e3e9467-1d3f-4f7b-bada-f14176d2eb2fhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/9e3e9467-1d3f-4f7b-bada-f14176d2eb2fJerryCichttp://social.msdn.microsoft.com/Profile/en-US/?user=JerryCicwhere is my pre-edited data in the datagridview?Hi<br /><br /> <pre lang="x-vbnet"> ' Here is where i load my datagridview Private Sub OE_Prices_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.dgPrices.AutoGenerateColumns = False ' Let's assume that the query is this: ' select 'a' as col1,'1.00' as col2 union ' select 'b' as col1,'2.00' as col2 union ' select 'c' as col1,'3.00' as col2 Me.dgPrices.DataSource = My.Utilities.GetDataTable(My.Utilities.Query_OEPrices) End Sub ' Here is the function that return the datatable Public Function GetDataTable(ByVal sql$) As DataTable Dim ans As New DataTable Dim sa As New SqlClient.SqlDataAdapter(sql, ConnectionString) sa.Fill(ans) sa.Dispose() Return ans End Function </pre> <br />After the user makes changes to certain cells, i wish to interrogate the grid to see if there are any changes to any cells.<br />My approach is to compare the current content to the original content.<br />I cannot seem to find where the system stores the original content.<br /><br />for example:&nbsp; The content of the current cell (0,0) is dgPrices.Rows(0).Cells(0).value<br />where is the original content of that cell?<br /><br />I have tried looking in ctype(dgprices.datasource,DataTable).Rows(0).Item(o) but it seems to contain the already&nbsp;modified version of the data.<br /><br />I know i can clone the original data table and use this for comparrison, but there must be a cleaner way to do it.<br />I also know i can use a binding source to get at the different versions of&nbsp;the data but since i am using a straight datatable as the datasource, I dont know how to get at the binding source.<br />&nbsp;<br />Any Ways<br />Thank you up front<br />Jerry CicieregaSun, 11 Oct 2009 15:09:30 Z2009-11-24T21:02:14Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/d871a6f1-cbc1-4905-aacd-15946b6afdd7http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/d871a6f1-cbc1-4905-aacd-15946b6afdd7jeffrey_qhttp://social.msdn.microsoft.com/Profile/en-US/?user=jeffrey_qUpon viewing generated csv file preceding number zero is missing?Hi,<br/><br/>I've been developing an export program which generate a csv file. <br/><br/>Column_A, Column_B, Column_C<br/>00014, Sample, test<br/><br/>Now upon this data is viewed in csv the trailing zero from column_A is gone. it becomes 14.<br/>I revise the writing of data from Column_A which if the start of it is zero i insert a single quote. Upon viewing it in csv i got a '00014 which single quote is visible. how can i remove this single quote? which i expected to view it 00014 only in csv file.<br/><br/>any trick ideas? please help.<br/><br/>THank you very much.<hr class="sig">Jeff®Sun, 22 Nov 2009 09:59:17 Z2009-11-24T20:44:23Z