Click here to Skip to main content
15,914,452 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Convert into VB Pin
killawatt21-Feb-06 11:12
killawatt21-Feb-06 11:12 
GeneralRe: Convert into VB Pin
Chiari21-Feb-06 14:43
Chiari21-Feb-06 14:43 
QuestionRead Text from MicrosoftWord using VB.NET Pin
RajaSrirangan20-Feb-06 20:14
RajaSrirangan20-Feb-06 20:14 
GeneralRe: Read Text from MicrosoftWord using VB.NET Pin
Guffa20-Feb-06 21:46
Guffa20-Feb-06 21:46 
Question1 Windows Appln & 1 Web Appln. Pin
DreamQuestioner20-Feb-06 18:49
DreamQuestioner20-Feb-06 18:49 
AnswerRe: 1 Windows Appln & 1 Web Appln. Pin
Dave Kreskowiak21-Feb-06 4:05
mveDave Kreskowiak21-Feb-06 4:05 
Questionupdating database using dataset Pin
mayhem_rules20-Feb-06 18:00
mayhem_rules20-Feb-06 18:00 
AnswerRe: updating database using dataset Pin
RichardBerry21-Feb-06 3:46
RichardBerry21-Feb-06 3:46 
Here are two funtions for Access.

<br />
Private Sub Do_Some_Work()<br />
<br />
Dim dt as DataTable<br />
<br />
FillTable(dt,"SELECT * FROM TableName")<br />
'<br />
'Modify the table <br />
'<br />
UpdateTable(dt,"SELECT * FROM TableName")<br />
<br />
End Sub<br />
<br />
Public Function FillTable(ByRef dt As DataTable, ByVal SelectString As String) As Boolean<br />
		Dim path As String = Application.StartupPath<br />
		Dim cnStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" _<br />
		& " Data source= " & path & "\MyDB.mdb"<br />
		Dim strSelect As String = SelectString<br />
		'& ";Connect Timeout=10"<br />
		Dim cn As New OleDb.OleDbConnection(cnStr)<br />
		Dim cmd As New OleDb.OleDbCommand(strSelect, cn)<br />
		Dim da As New OleDb.OleDbDataAdapter(cmd)<br />
		cmd.CommandTimeout = 5<br />
		Try<br />
			da.FillSchema(dt, SchemaType.Source)<br />
			da.Fill(dt)<br />
			Return True<br />
		Catch ex As Exception<br />
			Messagebox.Show(ex.Message)<br />
			Return False<br />
		Finally<br />
			cn.Close()<br />
		End Try<br />
	End Function<br />
<br />
	Public Function UpdateTable(ByVal dt As DataTable, ByVal strSelect As String) As Boolean<br />
		Dim path As String = Application.StartupPath<br />
		Dim cnStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" _<br />
		& " Data source= " & path & "\MyDB.mdb"<br />
		'& ";Connect Timeout=10"<br />
		Dim cn As New OleDb.OleDbConnection(cnStr)<br />
		Dim cmd As New OleDb.OleDbCommand(strSelect, cn)<br />
		Dim da As New OleDb.OleDbDataAdapter(cmd)<br />
		Dim cb As New OleDb.OleDbCommandBuilder(da)<br />
		cmd.CommandTimeout = 5<br />
		Try<br />
			cb.GetUpdateCommand()<br />
			da.Update(dt)<br />
			Return True<br />
		Catch ex As Exception<br />
			Messagebox.Show(ex.Message)<br />
			Return False<br />
		Finally<br />
			cn.Close()<br />
		End Try<br />
<br />
	End Function

AnswerRe: updating database using dataset Pin
Dave Kreskowiak21-Feb-06 4:04
mveDave Kreskowiak21-Feb-06 4:04 
Questiondetermine client subnet mask in terminal server Pin
samithaslk20-Feb-06 17:45
samithaslk20-Feb-06 17:45 
AnswerRe: determine client subnet mask in terminal server Pin
progload20-Feb-06 18:54
progload20-Feb-06 18:54 
GeneralRe: determine client subnet mask in terminal server Pin
Dave Kreskowiak21-Feb-06 3:56
mveDave Kreskowiak21-Feb-06 3:56 
GeneralRe: determine client subnet mask in terminal server Pin
samithaslk27-Feb-06 16:03
samithaslk27-Feb-06 16:03 
QuestionBinary Search Tree Pin
method44620-Feb-06 17:26
method44620-Feb-06 17:26 
AnswerRe: Binary Search Tree Pin
George L. Jackson20-Feb-06 17:44
George L. Jackson20-Feb-06 17:44 
QuestionTwo Dimension Array Length Pin
alien viper20-Feb-06 17:09
alien viper20-Feb-06 17:09 
AnswerRe: Two Dimension Array Length Pin
PremalathaP20-Feb-06 17:32
PremalathaP20-Feb-06 17:32 
GeneralRe: Two Dimension Array Length Pin
alien viper20-Feb-06 17:47
alien viper20-Feb-06 17:47 
AnswerRe: Two Dimension Array Length Pin
Joshua Quick20-Feb-06 17:47
Joshua Quick20-Feb-06 17:47 
QuestionVB to Crystal Reports parameter passing Pin
miftha20-Feb-06 17:04
miftha20-Feb-06 17:04 
QuestionQuestion on Listbox's SelectedIndexChange Event Pin
KaKa'20-Feb-06 15:42
KaKa'20-Feb-06 15:42 
AnswerRe: Question on Listbox's SelectedIndexChange Event Pin
Joshua Quick20-Feb-06 15:54
Joshua Quick20-Feb-06 15:54 
AnswerRe: Question on Listbox's SelectedIndexChange Event Pin
japel21-Feb-06 2:10
japel21-Feb-06 2:10 
QuestionCustom Minimize &amp; Maximize/Restore button Pin
ssfargade20-Feb-06 15:06
ssfargade20-Feb-06 15:06 
AnswerRe: Custom Minimize &amp; Maximize/Restore button Pin
Chatura Dilan20-Feb-06 20:38
Chatura Dilan20-Feb-06 20:38 

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.