Click here to Skip to main content
16,004,227 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to insert an image from VB to an access database Pin
EvScott17-Apr-07 4:12
EvScott17-Apr-07 4:12 
AnswerRe: how to insert an image from VB to an access database Pin
Sathesh Sakthivel17-Apr-07 5:27
Sathesh Sakthivel17-Apr-07 5:27 
Questiondesign the UI Pin
ciacia17-Apr-07 4:07
ciacia17-Apr-07 4:07 
AnswerRe: design the UI Pin
MatrixCoder17-Apr-07 5:18
MatrixCoder17-Apr-07 5:18 
Questionadd data to database Pin
peteyshrew17-Apr-07 4:03
peteyshrew17-Apr-07 4:03 
AnswerRe: add data to database Pin
Tarakeshwar Reddy17-Apr-07 4:52
professionalTarakeshwar Reddy17-Apr-07 4:52 
AnswerRe: add data to database Pin
manni_n17-Apr-07 6:56
manni_n17-Apr-07 6:56 
AnswerRe: add data to database Pin
klaydze17-Apr-07 21:48
klaydze17-Apr-07 21:48 
you can use this code also:

Public Function Query(ByVal SQL As String, ByVal OLEDBCon As OleDb.OleDbConnection, ByRef DS As DataSet) As Integer
Dim DA As New OleDb.OleDbDataAdapter(SQL, OLEDBCon)
Query = DA.Fill(DS)
DA = Nothing
End Function

Public Function Execute(ByVal SQL As String, ByVal OLEDBCon As OleDb.OleDbConnection) As Integer
Dim com As New OleDb.OleDbCommand(SQL, OLEDBCon)
com.ExecuteNonQuery()
com = Nothing
End Function

this is your connection string:

Dim con As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=sample.mdb")

code of your button save:

dim strInsert as string

try
strInsert="Insert into table1 (field1,fields2...) Values('" & txt1 & "','" & txt2 & "'...)"

con.open
Execute(strInsert,con)
MsgBox("Record Saved")

con.close

end try

my code is simple.Smile | :)

Don't block the drive way of all the newbies in programming. Smile | :) )

QuestionHow to run video file in vb.net windows application? Pin
balamurugan8217-Apr-07 3:50
balamurugan8217-Apr-07 3:50 
AnswerRe: How to run video file in vb.net windows application? Pin
MatrixCoder17-Apr-07 5:00
MatrixCoder17-Apr-07 5:00 
QuestionHow can we capture the incoming net send message in vb.net? Pin
vijay258317-Apr-07 3:39
vijay258317-Apr-07 3:39 
AnswerRe: How can we capture the incoming net send message in vb.net? Pin
Dave Kreskowiak17-Apr-07 7:19
mveDave Kreskowiak17-Apr-07 7:19 
QuestionSHDocVw.ShellWindows .Quit does not stop process Pin
SJR_117-Apr-07 2:41
SJR_117-Apr-07 2:41 
AnswerRe: SHDocVw.ShellWindows .Quit does not stop process Pin
Dave Kreskowiak17-Apr-07 6:43
mveDave Kreskowiak17-Apr-07 6:43 
AnswerRe: SHDocVw.ShellWindows .Quit does not stop process Pin
shreekar17-Apr-07 19:09
shreekar17-Apr-07 19:09 
QuestionWScript.CreateObject: Could not locate automation class named "wshAPIToolkitObject.ucATO" Pin
programvinod17-Apr-07 1:19
programvinod17-Apr-07 1:19 
AnswerRe: WScript.CreateObject: Could not locate automation class named "wshAPIToolkitObject.ucATO" Pin
Dave Kreskowiak17-Apr-07 6:46
mveDave Kreskowiak17-Apr-07 6:46 
Questionneed help on database connection! Pin
peteyshrew17-Apr-07 0:42
peteyshrew17-Apr-07 0:42 
AnswerRe: need help on database connection! Pin
ganero17-Apr-07 1:25
ganero17-Apr-07 1:25 
GeneralRe: need help on database connection! Pin
peteyshrew17-Apr-07 1:32
peteyshrew17-Apr-07 1:32 
GeneralRe: need help on database connection! Pin
ganero17-Apr-07 1:50
ganero17-Apr-07 1:50 
GeneralRe: need help on database connection! Pin
peteyshrew17-Apr-07 2:05
peteyshrew17-Apr-07 2:05 
GeneralRe: need help on database connection! Pin
Dayekh17-Apr-07 2:40
Dayekh17-Apr-07 2:40 
GeneralRe: need help on database connection! Pin
shreekar17-Apr-07 19:22
shreekar17-Apr-07 19:22 
AnswerRe: need help on database connection! Pin
klaydze17-Apr-07 22:00
klaydze17-Apr-07 22:00 

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.