<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://code.msdn.microsoft.com/rss.xsl"?><rss version="2.0"><channel><title>Visual Basic Forms over Data Video Series Samples</title><link>http://code.msdn.microsoft.com/vbvideosdata/Project/ProjectRss.aspx</link><description>This how-to video series is dedicated to getting Visual Basic developers productive on areas of data-based Windows Application development. </description><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
Hi Beth&lt;br /&gt; &lt;br /&gt;Thanks for this series. Really helped a lot.&lt;br /&gt; &lt;br /&gt;I can't seem to select a dataset project as referred to in your &amp;quot;#18 | How Do I: Use DataSets in an N-Tier Application?&amp;quot; when the dataset project is in a solution folder. Is there a way around this or am I doing something wrong.&lt;br /&gt;As soon as I move the dataset project to the root folder of the solution, it works.&lt;br /&gt; &lt;br /&gt;Thanks&lt;br /&gt; &lt;br /&gt;Johnny&lt;br /&gt;
&lt;/div&gt;</description><author>johnnygoodey</author><pubDate>Fri, 22 Aug 2008 04:51:01 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080822A</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
Hi Darh,&lt;br /&gt; &lt;br /&gt;It sounds like you need to create a parameterized query on your TableAdapter. Here's some information on how to do that: http://blogs.msdn.com/bethmassi/archive/2007/05/25/creating-a-parameterized-query.aspx&lt;br /&gt; &lt;br /&gt;You can also check the MSDN library: http://msdn.microsoft.com/en-us/library/ms171905.aspx &lt;br /&gt; &lt;br /&gt;HTH,&lt;br /&gt;-B&lt;br /&gt;
&lt;/div&gt;</description><author>BethMassi</author><pubDate>Wed, 13 Aug 2008 16:52:07 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080813P</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
Hi Beth,&lt;br /&gt; &lt;br /&gt;Many, many thanks for this series. You've really helped me get through some major sticking points in my learning curve. I hope you can point me past my next one, even if it's just were to go RTFM. My apologies if I missed this in the videos.&lt;br /&gt; &lt;br /&gt;When I set my application to do something like:&lt;br /&gt;        Me.CustomerTableAdapter.Fill(Me.CustomerLookupDataSet.Customer)&lt;br /&gt;        Me.OrderDetailTableAdapter.Fill(Me.OrdersDataSet.OrderDetail)&lt;br /&gt;        Me.OrdersTableAdapter.Fill(Me.OrdersDataSet.Orders)&lt;br /&gt;it pulls ALL the records from the database. In my case I'm displaying data for one customer, plus all that customer's orders. I'm using a combo box to select the particular customer to display. Rather than pulling all the data at once, I need to trigger the select and fill the form once the customer is selected. (FYI, an added complication is that I'm using a product called QODBC to access QuickBooks data.)&lt;br /&gt; &lt;br /&gt;I've tried setting up a separate lookup data source for just customer names &amp;amp; Ids, then binding the selected value to my complete customer data source, but can't get it to work. It should, shouldn't it? Or do I need to go the event programming route?&lt;br /&gt; &lt;br /&gt;Thanks,&lt;br /&gt; &lt;br /&gt;darh&lt;br /&gt;
&lt;/div&gt;</description><author>darh</author><pubDate>Tue, 12 Aug 2008 02:12:41 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080812A</guid></item><item><title>NEW POST: Sample DBs in SQLServer 2005 -- OMS.mdf has no log in the code avalable for download</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=539</link><description>&lt;div class="wikidoc"&gt;
 &lt;br /&gt;&lt;div class="quote"&gt;
 &lt;br /&gt;Seasoned wrote:&lt;br /&gt;The office manager database sample or OMS.mdf has a missing log file in the sample code downloaded.  Where can it be downloaded from?&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt; &lt;br /&gt;Nevermind.  OMS.ldf is not needed.  Using sqlcmd, the OMS.mdf file can be attached without the log file.  SQL Server simply creates it for you.&lt;br /&gt;
&lt;/div&gt;</description><author>Seasoned</author><pubDate>Sun, 20 Jul 2008 00:38:21 GMT</pubDate><guid isPermaLink="false">NEW POST: Sample DBs in SQLServer 2005 -- OMS.mdf has no log in the code avalable for download 20080720A</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
Sample DBs in SQLServer 2005 -- OMS.mdf has no matching log in the code available for download&lt;br /&gt;First post: Seasoned wrote: The office manager database sample or OMS.mdf has a missing log file in the sample code downloaded. Where can it be downloaded from? &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Nevermind.  OMS.ldf is not needed.  Using sqlcmd, the OMS.mdf file can be attached without the log file.  SQL Server simply creates it for you.&lt;br /&gt;
&lt;/div&gt;</description><author>Seasoned</author><pubDate>Sat, 19 Jul 2008 22:58:23 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080719P</guid></item><item><title>NEW POST: Sample DBs in SQLServer 2005 -- OMS.mdf has no matching log in the code available for download</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=540</link><description>&lt;div class="wikidoc"&gt;
The office manager database sample or OMS.mdf has a missing log file in the sample code downloaded.  Where can it be downloaded from?&lt;br /&gt; &lt;br /&gt;Nevermind.  OMS.ldf is not needed.  Using sqlcmd, the OMS.mdf file can be attached without the log file.  SQL Server simply creates it for you.&lt;br /&gt;
&lt;/div&gt;</description><author>Seasoned</author><pubDate>Sat, 19 Jul 2008 22:52:21 GMT</pubDate><guid isPermaLink="false">NEW POST: Sample DBs in SQLServer 2005 -- OMS.mdf has no matching log in the code available for download 20080719P</guid></item><item><title>NEW POST: Sample DBs in SQLServer 2005 -- OMS.mdf has no log in the code avalable for download</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=539</link><description>&lt;div class="wikidoc"&gt;
The office manager database sample or OMS.mdf has a missing log file in the sample code downloaded.  Where can it be downloaded from?&lt;br /&gt;
&lt;/div&gt;</description><author>Seasoned</author><pubDate>Sat, 19 Jul 2008 22:51:30 GMT</pubDate><guid isPermaLink="false">NEW POST: Sample DBs in SQLServer 2005 -- OMS.mdf has no log in the code avalable for download 20080719P</guid></item><item><title>NEW POST: Sample DBs in SQLServer 2005</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=499</link><description>&lt;div class="wikidoc"&gt;
You can run the samples with SQL Server 2005 as well.&lt;br /&gt;
&lt;/div&gt;</description><author>BethMassi</author><pubDate>Tue, 15 Jul 2008 21:27:43 GMT</pubDate><guid isPermaLink="false">NEW POST: Sample DBs in SQLServer 2005 20080715P</guid></item><item><title>NEW POST: Trouble with Delete in multi-table form (video 3)</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=485</link><description>&lt;div class="wikidoc"&gt;
Hi coleifer,&lt;br /&gt; &lt;br /&gt;The video uses the Data Source Wizard to automatically create the update, insert and delete statements. If you use the toolbar (BindingNavigator) you can add and delete the parent rows and if you want to delete the child rows, just select the row header and press the delete key. Under the covers the controls are bound to a BindingSource and you can programatically call AddNew or Delete on the parent or child bindingSource to add or remove rows from the DataSet. When you call Update on the tableAdapters later, the UpdateCommand, InsertCommand and DeleteCommand are executed against the databasse. To look at those commands select the TableAdapter in the Dataset designer and look at the properties. &lt;br /&gt; &lt;br /&gt;These videos will help explain these concepts better:&lt;br /&gt;http://msdn.microsoft.com/en-us/vbasic/bb725824.aspx&lt;br /&gt;http://msdn.microsoft.com/en-us/vbasic/bb725826.aspx&lt;br /&gt;http://msdn.microsoft.com/en-us/vbasic/cc138241.aspx&lt;br /&gt; &lt;br /&gt;HTH,&lt;br /&gt;-B&lt;br /&gt;
&lt;/div&gt;</description><author>BethMassi</author><pubDate>Tue, 15 Jul 2008 21:26:05 GMT</pubDate><guid isPermaLink="false">NEW POST: Trouble with Delete in multi-table form (video 3) 20080715P</guid></item><item><title>NEW POST: Sample DBs in SQLServer 2005</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=499</link><description>&lt;div class="wikidoc"&gt;
Great videos... very helpful.&lt;br /&gt;How can I run the sample DB (like OMS.mdf) in SQLServer 2005? I don't have SQLExpress installed.&lt;br /&gt;
&lt;/div&gt;</description><author>silverhalide</author><pubDate>Thu, 03 Jul 2008 13:20:04 GMT</pubDate><guid isPermaLink="false">NEW POST: Sample DBs in SQLServer 2005 20080703P</guid></item><item><title>NEW POST: Need to populate database programmatically...</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=476</link><description>&lt;div class="wikidoc"&gt;
Hello Greg;&lt;br /&gt; &lt;br /&gt;Not sure if this is the direction you are going but here are some ideas to maybe research until someone else gets you a more complete answer:&lt;br /&gt; &lt;br /&gt;Forgive me if this is too basic or not even in the general ball park of what you are looking for:&lt;br /&gt; &lt;br /&gt;Also note that in the code examples a sometimes it is converting my variable names to italics and dropping the underscore character...hope you can still make sense of it?&lt;br /&gt; &lt;br /&gt;You could create a custom class for helping to work with the data&lt;br /&gt;Part of that class could be a constructor or method to write the data to the database&lt;br /&gt; &lt;br /&gt;I just recently had a project that had to programmatically write to the database (up until that point all my apps pretty much just had the user entering info):&lt;br /&gt; &lt;br /&gt;The general process I use is as follows:&lt;br /&gt;1. store a connection string and use that to open a connection to the database useing the .open&lt;br /&gt;   a. example: Dim connection As New SqlConnection(&amp;quot;Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\LOGISTICS.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True&amp;quot;)&lt;br /&gt;   b. note that you would replace everything is quotes above with whatever your connection string would be.  One way to help come up with your connection string is when you are creating a new datasource open the connection string portion of the info box and you can copy/paste from it.&lt;br /&gt;   c. connection.open() -- this uses the connectoin string you created above and tries to open it.&lt;br /&gt;2. once I had an open connection I used the sqldatareader to read the data into memory string variables&lt;br /&gt;3. at that point I am having to create a text file so I am using the textout.write but it does not sound like that is what you are trying to do, so...&lt;br /&gt;4. another section of the program I am needing to write data out to the database - I created a class with properties to store what I needed and methods to write the properties I just set to the database&lt;br /&gt;5. I open a connection the same as above&lt;br /&gt;6. I dim a string as a New SqlCommand()&lt;br /&gt;  a:  Dim cmdInsertData As New SqlCommand()&lt;br /&gt;7. I use parameters and move data into them&lt;br /&gt;  a: Dim prmPackageStatus As New SqlParameter(&amp;quot;@Package&lt;i&gt;status&amp;quot;, m&lt;/i&gt;package_status)&lt;br /&gt;  b: this will create a variable called prmPackageStatus and put the data stored in the private variable m&lt;i&gt;pacakge&lt;/i&gt;status into it&lt;br /&gt;  c: in my case m_pacakge status happens to be filled in by use of a class but you could get data into it anyway you wanted.&lt;br /&gt;8. Call the connection using your connectoin string and your sqlcommand:&lt;br /&gt;  a:  cmdInsertData.Connection = connection&lt;br /&gt;9. I then build a string that holds the exact sql command I want to run&lt;br /&gt;  a: Dim sqlStatementBuild As String = &amp;quot;insert into Package (Package&lt;i&gt;status) values (@Package&lt;/i&gt;status,)&amp;quot;&lt;br /&gt;10. move that statement into your sqlcommand&lt;br /&gt;  a: cmdInsertData.CommandText = sqlStatementBuild&lt;br /&gt;11. open a connection, write the data and close the connection: (remember the word connection below is a string varaible holding my connection string)&lt;br /&gt;       connection.Open()&lt;br /&gt;        cmdInsertData.ExecuteNonQuery()&lt;br /&gt;        connection.Close()&lt;br /&gt; &lt;br /&gt;I do now if this helps or not, but it is one way to programmatically access a database.  Keep in mind that this is my first program to do this so I am &lt;b&gt;sure&lt;/b&gt; there are better ways!&lt;br /&gt;As a matter of fact if anybody knows a better way I would love to hear it!&lt;br /&gt; &lt;br /&gt;Not sure about the adding columns from the grid view -- if you still need an answer repost here and I would be glad to research it some....it would certainly be useful to know how to do that.&lt;br /&gt; &lt;br /&gt;Joe Ruder&lt;br /&gt;
&lt;/div&gt;</description><author>Mostly_Lucid</author><pubDate>Mon, 30 Jun 2008 12:47:48 GMT</pubDate><guid isPermaLink="false">NEW POST: Need to populate database programmatically... 20080630P</guid></item><item><title>NEW POST: Trouble with Delete in multi-table form (video 3)</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=485</link><description>&lt;div class="wikidoc"&gt;
I've been following the videos and in video 3, when there are multiple tables on a single form, the video does not explain how to implement DELETE or INSERT functionality.  How does this work?&lt;br /&gt;
&lt;/div&gt;</description><author>coleifer</author><pubDate>Sun, 29 Jun 2008 19:10:59 GMT</pubDate><guid isPermaLink="false">NEW POST: Trouble with Delete in multi-table form (video 3) 20080629P</guid></item><item><title>NEW POST: Need to populate database programmatically...</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=476</link><description>&lt;div class="wikidoc"&gt;
Hi There.&lt;br /&gt;I watched the series of videos, and wondered; &amp;quot;How can I add data to the database by automatically by code?&amp;quot;  I am using visual studio 2008.&lt;br /&gt; &lt;br /&gt;I want to take input from user, generate number sets from this input, then put the number sets into the database.  Depending on the input, there could be anywhere from 64 to 4096 individual number sets all refering to the user input.&lt;br /&gt;The user will then be able to manipulate the number sets and add descriptions, names, etc., with the original input as reference (also to be stored in the database)&lt;br /&gt; &lt;br /&gt;I also need to know how to add columns (or remove columns) from the grid view depending on the user's input at run time.&lt;br /&gt; &lt;br /&gt;Is this even possible?&lt;br /&gt;
&lt;/div&gt;</description><author>Greg</author><pubDate>Thu, 26 Jun 2008 02:15:12 GMT</pubDate><guid isPermaLink="false">NEW POST: Need to populate database programmatically... 20080626A</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
&lt;div class="quote"&gt;
 &lt;br /&gt;BethMassi wrote:&lt;br /&gt;Hi Omar,&lt;br /&gt; &lt;br /&gt;When you specify the join in the select command using the Query builder, it will ask you if it shuold regenerate the commands for insert/update/delete. Just say NO and those commands will remain intact.&lt;br /&gt; &lt;br /&gt;HTH,&lt;br /&gt;-B&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt; &lt;br /&gt;Hi Beth, I did that but it doesn't asked me that! I have VS 2005 the professional edition&lt;br /&gt;
&lt;/div&gt;</description><author>omarcb11</author><pubDate>Sun, 15 Jun 2008 00:41:37 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080615A</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
Hi Omar,&lt;br /&gt; &lt;br /&gt;When you specify the join in the select command using the Query builder, it will ask you if it shuold regenerate the commands for insert/update/delete. Just say NO and those commands will remain intact.&lt;br /&gt; &lt;br /&gt;HTH,&lt;br /&gt;-B&lt;br /&gt;
&lt;/div&gt;</description><author>BethMassi</author><pubDate>Fri, 13 Jun 2008 23:52:11 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080613P</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
&lt;div class="quote"&gt;
 &lt;br /&gt;BethMassi wrote:&lt;br /&gt;If you're not allowing the user to overwrite the price per OrderDetail then the detail.Price column doesn't need to exist in the database. You can specify a join in your query to create the column only in the OrderDetail DataTable (this is the client-side entity) and use it as a placeholder on the form. &lt;br /&gt; &lt;br /&gt;HTH,&lt;br /&gt;-Beth&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;
&lt;/div&gt; &lt;br /&gt;Hi Beth and thank you again, yes! I'm not allowing the user to overwrite the price per OrderDetail so I don't need the OrderDetail.Price field, but when I specified the join in the query, the DataSet designer eliminates me the commands(insert, update, delete, that's what I discover) because in the code of the &amp;quot;Function Save&amp;quot; there's no Update statement for the OrderDetailTableAdapter, so what I do for this is that, before I make the join in the query I copy the commands text then I do the join and put the commands text manually, but that throws me an error when I click save.&lt;br /&gt; &lt;br /&gt;What can I do so my form could run great? :(&lt;br /&gt; &lt;br /&gt;Thank You.&lt;br /&gt;
&lt;/div&gt;</description><author>omarcb11</author><pubDate>Fri, 13 Jun 2008 16:43:00 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080613P</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
Beth,&lt;br /&gt; &lt;br /&gt;Thank you for the answer and the explaining code to go along with it.  BTW - I recently finished video 15 of yours - it really did a good job of tying together stuff I had already learned from the previous videos.  Thanks!&lt;br /&gt; &lt;br /&gt;Joe&lt;br /&gt;
&lt;/div&gt;</description><author>Mostly_Lucid</author><pubDate>Fri, 13 Jun 2008 13:24:35 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080613P</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
 &lt;br /&gt;&lt;div class="quote"&gt;
 &lt;br /&gt;Mostly_Lucid wrote:&lt;br /&gt;You have us insert code into the combox1_selectedindexchanged event handler:&lt;br /&gt;Me.ProductBindingSource.Position = Me.ComboBox1.SelectedIndex&lt;br /&gt; &lt;br /&gt;What does this code do?  My program seems to function the same with or without it.&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt; &lt;br /&gt;Hi Mostly_Lucid,&lt;br /&gt; &lt;br /&gt;I believe back in VS2005/Fx 2.0 this was necessary because the ListBox and the Combobox did not move the BindingSource's position. And in testing with VS 2008, you'll notice that you get two different position values if you don't set it explicitly in the SelectedIndexChanged event which depending on what you're doing it could cause issues. The BindingSource isn't moving until after the SelectedIndexChanged event fires:&lt;br /&gt; &lt;br /&gt;Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged&lt;br /&gt;        MsgBox(&amp;quot;Binding Source: &amp;quot; &amp;amp; Me.CustomerBindingSource.Position.ToString)&lt;br /&gt;        MsgBox(&amp;quot;Combobox: &amp;quot; &amp;amp; Me.ComboBox1.SelectedIndex.ToString)&lt;br /&gt;End Sub&lt;br /&gt; &lt;br /&gt;HTH,&lt;br /&gt;-B&lt;br /&gt;
&lt;/div&gt;</description><author>BethMassi</author><pubDate>Wed, 11 Jun 2008 17:17:25 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080611P</guid></item><item><title>NEW POST: Any Questions?</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=206</link><description>&lt;div class="wikidoc"&gt;
Hi Omar,&lt;br /&gt; &lt;br /&gt;Try handling the CurrentChanged event on the ProductBindingSource. Cast the ProductBindingSource.Current to your ProductDataRow and then set the detail row's price column to that on the Product. Something like:&lt;br /&gt; &lt;br /&gt; Private Sub ProductsBindingSource_CurrentChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductsBindingSource.CurrentChanged&lt;br /&gt;        Dim product As ProductsLookupDataSet.ProductRow&lt;br /&gt;        product = CType(CType(Me.ProductsBindingSource.Current, DataRowView).Row, ProductsLookupDataSet.ProductRow)&lt;br /&gt; &lt;br /&gt;        Dim detail As OrdersDataSet.OrderDetailRow&lt;br /&gt;        detail = CType(CType(Me.OrderDetailBindingSource.Current, DataRowView).Row, OrdersDataSet.OrderDetailRow)&lt;br /&gt; &lt;br /&gt;        detail.Price = product.Price&lt;br /&gt; &lt;br /&gt;    End Sub&lt;br /&gt; &lt;br /&gt;If you're not allowing the user to overwrite the price per OrderDetail then the detail.Price column doesn't need to exist in the database. You can specify a join in your query to create the column only in the OrderDetail DataTable (this is the client-side entity) and use it as a placeholder on the form. &lt;br /&gt; &lt;br /&gt;HTH,&lt;br /&gt;-Beth&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>BethMassi</author><pubDate>Wed, 11 Jun 2008 16:47:35 GMT</pubDate><guid isPermaLink="false">NEW POST: Any Questions? 20080611P</guid></item><item><title>NEW POST: #1 How Do I: Create a Database</title><link>http://code.msdn.microsoft.com/vbvideosdata/Thread/View.aspx?ThreadId=276</link><description>&lt;div class="wikidoc"&gt;
 &lt;br /&gt;&lt;div class="quote"&gt;
 &lt;br /&gt;TomLee wrote:&lt;br /&gt;Hi Massi,&lt;br /&gt; &lt;br /&gt;First of all, thank you very much for your efforts that sharing your VB programming experience to us. It's make me a rough idea to learn VB in myself.&lt;br /&gt; &lt;br /&gt;I'm a newbies to learn VB database program. Could inform us why do you suggest to implement the &amp;quot;Store Procedures&amp;quot;  in MDF file? I cannot find the differents in  &amp;quot;Video #2How Do I: Connect to a Database&amp;quot;&lt;br /&gt; &lt;br /&gt;Besides, in the reportviewer call in video # 14, how do I print out one record in detail (two table data)  thr printer?&lt;br /&gt; &lt;br /&gt;Lastly, how can I auto generate the number such as 5 digits (0804-0001) in the From like reference number?&lt;br /&gt; &lt;br /&gt;Thanks for your help.&lt;br /&gt; &lt;br /&gt;Tom&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;
&lt;/div&gt; &lt;br /&gt;Hello,&lt;br /&gt; &lt;br /&gt;I'll take a swing at this - hope it helps:&lt;br /&gt; &lt;br /&gt;1. Stored procedures allow you as a programmer to have control over how a database is updated or changed.  If you store a procedure to add a record to a table for instance, then you can make sure it is done exactly how you want.  Later, when someone programs code to access your table all they have to do is call your procudure and you will be assured that YOUR code is updateing the database, not the standard code that VS inserts into a program.  In Beths example the procedure happens to work the same of the generated code, but there is no reason that it has to.  She could have had it do several other things if she wanted it to.  Another reason is for maintainability - if you need to change something later, you can change it at the database level and it will not &amp;quot;break&amp;quot; any code that access it.&lt;br /&gt; &lt;br /&gt;2. Sorry, can't help here&lt;br /&gt; &lt;br /&gt;3. If I understand the question correctly: When you go to a tables list of columns and go to the columns properties - you want to turn on the Identity setting.  This will also allow you to set a starting number (the seed) and set the increment amount.  If you are not wanting it to be handled this way they you would have to simply read in the data you want and programaticly increase the value before writing it back to the database.&lt;br /&gt; &lt;br /&gt;Hope this helps,&lt;br /&gt; &lt;br /&gt;Joe&lt;br /&gt;
&lt;/div&gt;</description><author>Mostly_Lucid</author><pubDate>Mon, 09 Jun 2008 13:53:06 GMT</pubDate><guid isPermaLink="false">NEW POST: #1 How Do I: Create a Database 20080609P</guid></item></channel></rss>