Click here to Skip to main content
15,949,686 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Application with calendar menu Pin
n3814-Jun-13 6:24
n3814-Jun-13 6:24 
GeneralRe: Application with calendar menu Pin
Dave Kreskowiak4-Jun-13 10:33
mveDave Kreskowiak4-Jun-13 10:33 
GeneralRe: Application with calendar menu Pin
n3814-Jun-13 10:53
n3814-Jun-13 10:53 
GeneralRe: Application with calendar menu Pin
Dave Kreskowiak4-Jun-13 11:01
mveDave Kreskowiak4-Jun-13 11:01 
GeneralRe: Application with calendar menu Pin
n3814-Jun-13 12:10
n3814-Jun-13 12:10 
GeneralRe: Application with calendar menu Pin
Edward Giles25-Jun-13 23:00
Edward Giles25-Jun-13 23:00 
GeneralRe: Application with calendar menu Pin
n38126-Jun-13 3:11
n38126-Jun-13 3:11 
QuestionHow to insert all characters in database Pin
Beiniam3-Jun-13 21:05
Beiniam3-Jun-13 21:05 
hello guys i have doing some project and since i have new for vb.net 2010. my project is coded in vb.net 2010 and ms access 2007 mdb database. i have DocId, description, date and other fileds in the table.. my querry works for all but. i can't add all characters except integers in the database column DocId. it accepts only integer values. so how can i insert characters in the DocId filed. here is the detail

tables: DocId======Textbox name RefferencNoTxt.Text

Table name = EraDms
database name= data

VB
cmd.CommandText = "INSERT INTO EraDms(DocId,Description,Address,NoOfPages, SendOrReceived, SentDate,ReceivedDate,ForwardedWorkingUnit,Attachements,ForwardedDate,ReceivedBy,DocPath) " & _
                           " VALUES(" & Me.RefferencNoTxt.Text.ToString & ",'" & Me.DescriptionTextBox.Text & "','" & Me.AddressTextBox.Text & "','" & Me.NoOfPagesTextBox.Text & "','" & Me.SendOrReceievedComboBox.Text & "','" & _
                           Me.SentDateTextBox.Text & "','" & Me.receivedDate.Text & "','" & Me.ForwardedWorkingUnitTextBox.Text & "','" & Me.AttachementsTextBox.Text & "','" & Me.TextBox6.Text & "','" & Me.ReceivedByTextBox.Text & "','" & Me.DocPathTextBox.Text & "')"
           cmd.ExecuteNonQuery()
           MessageBox.Show("File Upload Successfull", "ERA-DMS-File Uploader", MessageBoxButtons.OK, MessageBoxIcon.Information)
           RefreshData()

           '  With ERA_DMS_HOME

           ' End With
           cnn.Close()
       Else
           'update data in table
           cmd.CommandText = "UPDATE Eradms " & _
                       " SET DocId=" & Me.RefferencNoTxt.Text.ToString & _
                       ", Description='" & Me.DescriptionTextBox.Text & "'" & _
                       ", Address='" & Me.AddressTextBox.Text & "'" & _
                       ", NoOfPages='" & Me.NoOfPagesTextBox.Text & "'" & _
                       ", SendOrReceived='" & Me.SendOrReceievedComboBox.Text & "'" & _
                       ", SentDate='" & Me.SentDateTextBox.Text & "'" & _
                        ", ReceivedDate='" & Me.TextBox1.Text & "'" & _
            ", ForwardedWorkingUnit='" & Me.ForwardedWorkingUnitTextBox.Text & "'" & _
             ", Attachements='" & Me.AttachementsTextBox.Text & "'" & _
             ",ForwardedDate ='" & Me.TextBox6.Text & "'" & _
             ",ReceivedBy ='" & Me.ReceivedByTextBox.Text & "'" & _
             ",DocPath='" & Me.DocPathTextBox.Text & "'" &
                       " WHERE DocId=" & Me.RefferencNoTxt.Text.ToString
           cmd.ExecuteNonQuery()
           RefreshData()




Private Sub RefreshData()
       Try


           If Not cnn.State = ConnectionState.Open Then
               'open connection
               cnn.Open()
           End If

           Dim da As New OleDb.OleDbDataAdapter("SELECT * FROM EraDms", cnn)



           Dim dt As New DataTable
           'fill data to datatable
           da.Fill(dt)

           'offer data in data table into datagridview


       Catch ex As OleDb.OleDbException
       End Try
   End Sub


best regards
AnswerRe: How to insert all characters in database Pin
Bernhard Hiller3-Jun-13 21:22
Bernhard Hiller3-Jun-13 21:22 
GeneralRe: How to insert all characters in database Pin
Beiniam3-Jun-13 22:22
Beiniam3-Jun-13 22:22 
AnswerRe: How to insert all characters in database Pin
Richard MacCutchan3-Jun-13 22:57
mveRichard MacCutchan3-Jun-13 22:57 
AnswerRe: How to insert all characters in database Pin
Simon_Whale3-Jun-13 23:04
Simon_Whale3-Jun-13 23:04 
SuggestionRe: How to insert all characters in database Pin
Richard Deeming4-Jun-13 1:54
mveRichard Deeming4-Jun-13 1:54 
GeneralRe: How to insert all characters in database Pin
Beiniam4-Jun-13 3:02
Beiniam4-Jun-13 3:02 
QuestionUnable to Update LDAP property "department" Pin
David Mujica3-Jun-13 10:12
David Mujica3-Jun-13 10:12 
AnswerRe: Unable to Update LDAP property "department" Pin
Bernhard Hiller3-Jun-13 21:20
Bernhard Hiller3-Jun-13 21:20 
GeneralRe: Unable to Update LDAP property "department" Pin
David Mujica5-Jun-13 0:23
David Mujica5-Jun-13 0:23 
QuestionHow difficult to switch from DoEvents to Threading? Pin
treddie2-Jun-13 11:19
treddie2-Jun-13 11:19 
AnswerRe: How difficult to switch from DoEvents to Threading? Pin
Dave Kreskowiak2-Jun-13 19:28
mveDave Kreskowiak2-Jun-13 19:28 
GeneralRe: How difficult to switch from DoEvents to Threading? Pin
treddie2-Jun-13 20:57
treddie2-Jun-13 20:57 
QuestionVB.NET and PHP mysql connection Pin
Amiet_Mhaske2-Jun-13 9:52
Amiet_Mhaske2-Jun-13 9:52 
QuestionThe old DoEvents and UserControls Pin
treddie1-Jun-13 18:41
treddie1-Jun-13 18:41 
AnswerRe: The old DoEvents and UserControls Pin
Dave Kreskowiak2-Jun-13 4:03
mveDave Kreskowiak2-Jun-13 4:03 
GeneralRe: The old DoEvents and UserControls Pin
treddie2-Jun-13 7:21
treddie2-Jun-13 7:21 
GeneralRe: The old DoEvents and UserControls Pin
Dave Kreskowiak2-Jun-13 7:42
mveDave Kreskowiak2-Jun-13 7:42 

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.