Click here to Skip to main content
15,897,187 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to open an excel file in the Visual Basic 6.0 Form Pin
Member 224184315-May-08 1:02
Member 224184315-May-08 1:02 
AnswerRe: How to open an excel file in the Visual Basic 6.0 Form Pin
helelark12315-May-08 3:30
helelark12315-May-08 3:30 
QuestionInsert Row In Excel File Pin
hitesh sojitra15-May-08 0:36
hitesh sojitra15-May-08 0:36 
AnswerRe: Insert Row In Excel File Pin
parth.p15-May-08 0:59
parth.p15-May-08 0:59 
GeneralRe: Insert Row In Excel File Pin
hitesh sojitra15-May-08 1:29
hitesh sojitra15-May-08 1:29 
GeneralRe: Insert Row In Excel File Pin
hitesh sojitra15-May-08 1:48
hitesh sojitra15-May-08 1:48 
GeneralRe: Insert Row In Excel File Pin
hitesh sojitra15-May-08 1:55
hitesh sojitra15-May-08 1:55 
Questiondata binding update problem Pin
asha_s15-May-08 0:33
asha_s15-May-08 0:33 
hi i am using data binding and this is my code
Imports System.Drawing.Printing<br />
<br />
<br />
Public Class Form2<br />
    Public ConStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _<br />
       "Data Source =" & Application.StartupPath & "\ITDSS.mdb"<br />
    Public con As New OleDbConnection(ConStr)<br />
    Dim DataSet1, course As New DataSet<br />
    'Dim SQLstr = "SELECT SectionID,Type,Group,TeacherID from [Section]"<br />
    Dim SQLstr = "SELECT DISTINCT  s.LevelNo, c.CourseID,c.SectionID,c.Type,c.Group, r.RoomID FROM [Section] c,Course s,[Slot] r  where s.CourseID=c.CourseID and c.SectionID=r.SectionID  ORDER BY s.LevelNo" ' in(select CourseID from Course  Where LevelNo=1)" 's,Course c WHERE s.CourseID = c.CourseID ORDER BY c.LevelNo"<br />
<br />
    Dim DataAdapter1 As New OleDb.OleDbDataAdapter(SQLstr, con)<br />
<br />
    '----------------------===============================<br />
    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
        Dim SQLstr, SQLstr1 As String<br />
<br />
        'Dim DataSet1, course As New DataSet<br />
        'SQLstr = "SELECT SectionID,Type,Group from [Section]"<br />
        Con.Open()<br />
<br />
        'DataAdapter1 = New OleDb.OleDbDataAdapter(SQLstr, con)<br />
<br />
<br />
        DataAdapter1.Fill(DataSet1, "Section")<br />
<br />
        Me.DataBindings.Add("text", DataSet1, "Section.SectionID")<br />
<br />
        DataGridView1.DataSource = DataSet1<br />
        DataGridView1.DataMember = "Section"<br />
<br />
<br />
        Dim bmb As BindingManagerBase<br />
        bmb = Me.BindingContext(DataSet1, "Section")<br />
        bmb.Position = bmb.Count<br />
        bmb.Position = 0<br />
         end sub


and i want to update it when button press

i but the flowing code


 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click<br />
        Dim CmdB As New OleDb.OleDbCommandBuilder(DataAdapter1)<br />
        DataAdapter1.Update(DataSet1, "Section")<br />
<br />
    End Sub<br />
End Class


but it give error update statement

please i need help Cry | :(( Sleepy | :zzz:
AnswerRe: data binding update problem Pin
Mycroft Holmes15-May-08 19:44
professionalMycroft Holmes15-May-08 19:44 
QuestionCatching an exception from a control Pin
Steven J Jowett14-May-08 22:33
Steven J Jowett14-May-08 22:33 
AnswerRe: Catching an exception from a control Pin
Chinners15-May-08 0:55
Chinners15-May-08 0:55 
GeneralRe: Catching an exception from a control Pin
Steven J Jowett15-May-08 1:08
Steven J Jowett15-May-08 1:08 
QuestionCompressing in vb .net 2003 Pin
aphei14-May-08 22:23
aphei14-May-08 22:23 
AnswerRe: Compressing in vb .net 2003 Pin
Steven J Jowett14-May-08 22:50
Steven J Jowett14-May-08 22:50 
AnswerRe: Compressing in vb .net 2003 Pin
Steven J Jowett14-May-08 23:07
Steven J Jowett14-May-08 23:07 
QuestionVB 6 question, Pin
nitin314-May-08 20:57
nitin314-May-08 20:57 
AnswerRe: VB 6 question, Pin
helelark12315-May-08 3:34
helelark12315-May-08 3:34 
QuestionSelect Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 20:52
TeiUKei14-May-08 20:52 
AnswerRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 21:06
Ajay.k_Singh14-May-08 21:06 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 21:24
TeiUKei14-May-08 21:24 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 21:39
Ajay.k_Singh14-May-08 21:39 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 22:25
TeiUKei14-May-08 22:25 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 22:31
Ajay.k_Singh14-May-08 22:31 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 22:38
TeiUKei14-May-08 22:38 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 22:50
Ajay.k_Singh14-May-08 22:50 

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.