I am not sure what you are saying about splitting the code. Are you modifying the code in the Wizard generated code section of the form? If so then yes, it will change everytime
you even add a control much less change versions. I have upgraded a couple of projects with a datagrid from 1.0 to 1.1 with no bad effects.
Want to know more? Check out the MSDN Library at
http://msdn.microsoft.com or the Microsoft Knowledge Base at
http://support.microsoft.com
Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email :
(E-Mail Removed) <Remove word online. from address>
This posting is provided “AS IS”, with no warranties, and confers no rights.
--------------------
>Content-Class: urn:content-classes:message
>From: "Petr Studenovsky" <(E-Mail Removed)>
>Sender: "Petr Studenovsky" <(E-Mail Removed)>
>Subject: DataGird and convertion VS 1.0 and VS 1.1
>Date: Fri, 1 Aug 2003 05:52:28 -0700
>Lines: 105
>Message-ID: <678401c3582b$c3c6f5a0$(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcNYK8PGTSv/4gTdR6CPi0/42GP9uQ==
>Newsgroups: microsoft.public.dotnet.general
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:103116
>NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
>X-Tomcat-NG: microsoft.public.dotnet.general
>
>Hello
>
>I made small GUI test program in Visual Basic NET for SQL
>communication. I need some help with these problems.
>
>problem 1)
> If I change some settings in datagrid from
>properties window (e.g. background color). my datatest is
>removed. I compared it with diff program and it
>reorganized all source code.
>problem 2)
> When I open project in VS.NET 2003, it asks for
>some conversion. After this conversion project is not
>working any more (Datagrid shows empty results and there
>are some other wornigs).
>
>Question 1)
> Is it ok to split wizard code this way or is there
>another recomendet method
>
>Question 2)
> Is it possible that there is some know problem
>with project's conversion between VS 1.0 and VS 1.1. Or is
>it caused by my code design.
>
>
>Project uses Datagrid and SQL connection (connector and
>dataset). I genarated the connection with data wizard. I
>splitted this generated code into two parts. An unvisible
>part of the connection is in dll library, it means these
>variables and there initialisation.
> Public Class iceMain
> Public WithEvents SqlDataAdapter1 As
>System.Data.SqlClient.SqlDataAdapter
> Friend WithEvents SqlSelectCommand1 As
>System.Data.SqlClient.SqlCommand
> Friend WithEvents SqlInsertCommand1 As
>System.Data.SqlClient.SqlCommand
> Friend WithEvents SqlUpdateCommand1 As
>System.Data.SqlClient.SqlCommand
> Friend WithEvents SqlDeleteCommand1 As
>System.Data.SqlClient.SqlCommand
> Friend WithEvents SqlConnection1 As
>System.Data.SqlClient.SqlConnection
> Public WithEvents DsUzivatele1 As CMain.DsUzivatele
>
>
> --my init method contains:
> Me.DsUzivatele1 = New CMain.DsUzivatele()
> Me.SqlDataAdapter1 = New
>System.Data.SqlClient.SqlDataAdapter()
> Me.SqlDeleteCommand1 = New
>System.Data.SqlClient.SqlCommand()
> Me.SqlConnection1 = New
>System.Data.SqlClient.SqlConnection()
> Me.SqlInsertCommand1 = New
>System.Data.SqlClient.SqlCommand()
> Me.SqlSelectCommand1 = New
>System.Data.SqlClient.SqlCommand()
> Me.SqlUpdateCommand1 = New
>System.Data.SqlClient.SqlCommand()
> CType(Me.DsUzivatele1,
>System.ComponentModel.ISupportInitialize).BeginInit()
>
> 'DsUzivatele1
> '
> Me.DsUzivatele1.DataSetName = "DsUzivatele"
> Me.DsUzivatele1.Locale = New
>System.Globalization.CultureInfo("de-DE")
> Me.DsUzivatele1.Namespace
>= "http://www.tempuri.org/DsUzivatele.xsd"
> '
> 'SqlDataAdapter1
> '
> Me.SqlDataAdapter1.DeleteCommand =
>Me.SqlDeleteCommand1
> Me.SqlDataAdapter1.InsertCommand =
>Me.SqlInsertCommand1
> Me.SqlDataAdapter1.SelectCommand =
>Me.SqlSelectCommand1
> Me.SqlDataAdapter1.TableMappings.AddRange(New
>System.Data.Common.DataTableMapping() {New
>System.Data.Common.DataTableMapping("Table", "uzivatele",
>New System.Data.Common.DataColumnMapping() {New
>System.Data.Common.DataColumnMapping("userID", "userID"),
>New System.Data.Common.DataColumnMapping
>("uzivatelskeJmeno", "uzivatelskeJmeno"), New
>System.Data.Common.DataColumnMapping("heslo", "heslo"),
>New
>
> ...
>
>
>
>A grid control is in test application that use exported
>dataset from dll.
> ....
> Me.DataGrid1.DataMember = "uzivatele"
> Me.DataGrid1.DataSource = mCman.DsUzivatele1
> <======= (removed by wisual editation)
> Me.DataGrid1.HeaderForeColor =
>System.Drawing.SystemColors.ControlText
> ....
>
>Thank you
>