Click here to Skip to main content
16,009,112 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: MP3 to Wav? Pin
TheMrProgrammer20-Jun-09 20:25
TheMrProgrammer20-Jun-09 20:25 
QuestionClickOnce Deployment Pin
Ovais Memon19-Jun-09 23:11
Ovais Memon19-Jun-09 23:11 
AnswerRe: ClickOnce Deployment Pin
miguelfreirejunior22-Oct-09 10:33
miguelfreirejunior22-Oct-09 10:33 
QuestionPlz help me in developing win32 application" Pin
sweety200619-Jun-09 22:01
sweety200619-Jun-09 22:01 
AnswerRe: Plz help me in developing win32 application" Pin
Christian Graus19-Jun-09 22:42
protectorChristian Graus19-Jun-09 22:42 
AnswerRe: Plz help me in developing win32 application" Pin
Henry Minute20-Jun-09 1:37
Henry Minute20-Jun-09 1:37 
GeneralRe: Plz help me in developing win32 application" Pin
Luc Pattyn20-Jun-09 2:09
sitebuilderLuc Pattyn20-Jun-09 2:09 
GeneralRe: Plz help me in developing win32 application" Pin
Henry Minute20-Jun-09 2:17
Henry Minute20-Jun-09 2:17 
AnswerRe: Plz help me in developing win32 application" Pin
Luc Pattyn20-Jun-09 2:12
sitebuilderLuc Pattyn20-Jun-09 2:12 
GeneralRe: Plz help me in developing win32 application" Pin
Christian Graus20-Jun-09 11:31
protectorChristian Graus20-Jun-09 11:31 
GeneralRe: Plz help me in developing win32 application" Pin
Luc Pattyn20-Jun-09 12:07
sitebuilderLuc Pattyn20-Jun-09 12:07 
GeneralRe: Plz help me in developing win32 application" Pin
Christian Graus20-Jun-09 13:06
protectorChristian Graus20-Jun-09 13:06 
QuestionVB.NET - Ms-access - Error - "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." Pin
sivakumar.mariappan19-Jun-09 20:46
sivakumar.mariappan19-Jun-09 20:46 
AnswerRe: VB.NET - Ms-access - Error - "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." Pin
Dave Kreskowiak20-Jun-09 10:08
mveDave Kreskowiak20-Jun-09 10:08 
Questionhi everyone need help Pin
harieshkumar.n19-Jun-09 20:08
harieshkumar.n19-Jun-09 20:08 
AnswerRe: hi everyone need help Pin
Christian Graus19-Jun-09 20:10
protectorChristian Graus19-Jun-09 20:10 
GeneralRe: hi everyone need help Pin
harieshkumar.n22-Jun-09 0:40
harieshkumar.n22-Jun-09 0:40 
QuestionHow can I take information from a child form and show it to a parent form Pin
waner michaud19-Jun-09 11:45
waner michaud19-Jun-09 11:45 
AnswerRe: How can I take information from a child form and show it to a parent form Pin
Christian Graus19-Jun-09 12:43
protectorChristian Graus19-Jun-09 12:43 
GeneralRe: How can I take information from a child form and show it to a parent form Pin
waner michaud22-Jun-09 10:37
waner michaud22-Jun-09 10:37 
GeneralRe: How can I take information from a child form and show it to a parent form Pin
programmervb.netc++24-Jun-09 21:06
programmervb.netc++24-Jun-09 21:06 
GeneralRe: How can I take information from a child form and show it to a parent form Pin
waner michaud25-Jun-09 2:33
waner michaud25-Jun-09 2:33 
GeneralRe: How can I take information from a child form and show it to a parent form Pin
programmervb.netc++25-Jun-09 5:49
programmervb.netc++25-Jun-09 5:49 
GeneralRe: How can I take information from a child form and show it to a parent form Pin
waner michaud25-Jun-09 6:18
waner michaud25-Jun-09 6:18 
QuestionSMO Create and verify Indexes Pin
ghost80719-Jun-09 9:46
ghost80719-Jun-09 9:46 
I'm trying to write a utility that can compare a dataset to an existing SQL Server and then make changes to it via SMO
the problem i'm having currently is getting the indexes to be created properly.
dt is a table from the the .xsd dataset
TableToUpdate is the table i'm going to be making changes to.
VerifyTable is an exact copy of the table made at the same time TableToUpdate was created.

    Private Function UpdateColumn(ByRef TableToUpdate As Microsoft.SqlServer.Management.Smo.Table, ByVal ColumnToAdd As System.Data.DataColumn, ByVal dt As System.Data.DataTable, ByVal VerifyTable As Microsoft.SqlServer.Management.Smo.Table) As Boolean<br />
        Dim UpdateNeeded As Boolean = False<br />
        Dim idx As Index<br />
        Dim col As Column<br />
        col = TableToUpdate.Columns(ColumnToAdd.ColumnName)<br />
<br />
        col.Nullable = ColumnToAdd.AllowDBNull<br />
        col.DataType = GetTypeOfData(ColumnToAdd)<br />
<br />
        If Not ColumnToAdd.DefaultValue.Equals(DBNull.Value) Then<br />
            col.AddDefaultConstraint("DF_" & col.Name)<br />
            col.DefaultConstraint.Text = ColumnToAdd.DefaultValue.ToString<br />
        End If<br />
<br />
        col.Identity = ColumnToAdd.AutoIncrement<br />
        If col.Identity Then<br />
            col.IdentityIncrement = ColumnToAdd.AutoIncrementStep<br />
            col.IdentitySeed = ColumnToAdd.AutoIncrementSeed<br />
        End If<br />
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
''' Here is where i have problems<br />
''' Any Help in making this work would be greatly appreciated.<br />
''' I need this to Add key's(Primary and Index) if they are not there<br />
''' Delete it if it's not needed<br />
''' Or Change it if its needed<br />
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
        Dim pkColumns() As DataColumn<br />
        pkColumns = dt.PrimaryKey<br />
<br />
        If pkColumns.Contains(ColumnToAdd) Or ColumnToAdd.Unique Then<br />
            For Each i As Index In TableToUpdate.Indexes<br />
                If Not i.IndexedColumns.Contains(ColumnToAdd.ColumnName) Then<br />
                    idx = New Index<br />
                    idx.Parent = TableToUpdate<br />
                    If pkColumns.Contains(ColumnToAdd) Then<br />
                        idx.Name = "PK_" & ColumnToAdd.ColumnName & "_" & dt.TableName<br />
                        idx.IndexKeyType = IndexKeyType.DriPrimaryKey<br />
                    Else<br />
                        idx.Name = "IDX_" & ColumnToAdd.ColumnName & "_" & dt.TableName<br />
                        idx.IndexKeyType = IndexKeyType.DriUniqueKey<br />
                    End If<br />
                    idx.IndexedColumns.Add(New IndexedColumn(idx, ColumnToAdd.ColumnName))<br />
                    UpdateNeeded = True<br />
                End If<br />
            Next<br />
        Else<br />
            If TableToUpdate.Indexes(0).IndexedColumns.Contains(ColumnToAdd.ColumnName) Then<br />
                '        Item exists but should not<br />
                TableToUpdate.Indexes(0).IndexedColumns.Remove(ColumnToAdd.ColumnName)<br />
                UpdateNeeded = True<br />
            End If<br />
        End If<br />
<br />
        For Each p As Microsoft.SqlServer.Management.Smo.Property In col.Properties<br />
            If Not p.Value.Equals(VerifyTable.Columns(ColumnToAdd.ColumnName).Properties(p.Name).Value) Then Return True<br />
        Next<br />
        Return UpdateNeeded<br />
<br />
    End Function

Thank you

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.