Click here to Skip to main content
15,902,939 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow do i open mail and web site from VB.NET Pin
Ryan Joseph18-Dec-03 16:20
Ryan Joseph18-Dec-03 16:20 
GeneralFileNameEditor attribute Pin
cnurse18-Dec-03 15:23
cnurse18-Dec-03 15:23 
GeneralRe: FileNameEditor attribute Pin
Dave Kreskowiak19-Dec-03 0:45
mveDave Kreskowiak19-Dec-03 0:45 
GeneralRe: FileNameEditor attribute Pin
cnurse19-Dec-03 1:05
cnurse19-Dec-03 1:05 
GeneralHI, how I can refresh a datagrid Pin
jlizardo18-Dec-03 11:21
jlizardo18-Dec-03 11:21 
GeneralConnection Pin
Anonymous18-Dec-03 7:01
Anonymous18-Dec-03 7:01 
GeneralRe: Connection Pin
VickyMD27-Dec-03 4:36
sussVickyMD27-Dec-03 4:36 
GeneralRe: Connection Pin
mikasa27-Dec-03 5:30
mikasa27-Dec-03 5:30 
First, you're using some bad programming techniques that will lead to some overhead in the Code. Anytime you Declare a Variable with the "...As New" and it's an Object, then every time you set a Property or use a Method, the VB Compiler ALWAYS checks to see if the Object has been instantiated...this is some significant overhead if you use this routine a lot.

Actually, it looks like the whole Connection String is wrong... The Provider "MSDASQL" is strictly used for DataSources that reside in the ODBC DataSources. If this is the Case, and you do not have a User / Password, then leave those Parameters out. Also, do not put a SemiColon at the end of the Connection String.

Also, why did you make an "ADODB.Command" Object if you never used it??

NOTE: Also, you better learn the difference between Dynamic, ForwardOnly, Static, and Keyset cursors before you program any further, you are not making the most efficient use of resources...

Dim adoCon As ADODB.Connection
Dim rsData As ADODB.Recordset

'Open the Connection
Set adoCon = New ADODB.Connection
'objcnn1.Open "Provider=MSDASQL.1;password =;User Id = ;Data Source=TEST;" (Wrong)
adoCon.Open "Provider=MSDASQL.1;Data Source=TEST"

'Open the Recordset
'Open ForwardOnly / ReadOnly because we are only Enumerating the Records (maybe filling a ComboBox)
Set rsData = New ADODB.Recordset
rsData.CursorLocation = adUseClient
rsData.Open "Select * From Test", adoCon, adOpenForwardOnly, adLockReadOnly, adCmdText

While (Not rsData.EOF)
     MsgBox " " & rsData.Fields(0).Value 'sDownload (Huh?)
     'MsgBox " " & rsData.Fields("FieldName").Value
     'MsgBox " " & rsData!FieldName
     'MsgBox " " & CStr(rsData!StringField)
     'MsgBox " " & CInt(rsData!NumberField)
     rsData.MoveNext
Wend

Generaloverride a rich text box draw function Pin
Zipadie Doodah18-Dec-03 5:03
Zipadie Doodah18-Dec-03 5:03 
GeneralClient area / Non-client area Pin
cnurse18-Dec-03 2:32
cnurse18-Dec-03 2:32 
GeneralWindows Message Queue Service (VB.NET) Pin
Nic Rowan17-Dec-03 20:31
Nic Rowan17-Dec-03 20:31 
GeneralAdd a new line to a text File Pin
Bondtje17-Dec-03 8:57
Bondtje17-Dec-03 8:57 
GeneralRe: Add a new line to a text File Pin
Dave Kreskowiak17-Dec-03 11:18
mveDave Kreskowiak17-Dec-03 11:18 
GeneralRe: Add a new line to a text File Pin
Bondtje17-Dec-03 12:24
Bondtje17-Dec-03 12:24 
QuestionHow make a picturebox public to forms?VB.net Pin
MJay17-Dec-03 7:52
MJay17-Dec-03 7:52 
AnswerRe: How make a picturebox public to forms?VB.net Pin
Zipadie Doodah18-Dec-03 6:22
Zipadie Doodah18-Dec-03 6:22 
Questionhow to set bmp format setting??VB.net Pin
MJay17-Dec-03 2:57
MJay17-Dec-03 2:57 
AnswerRe: how to set bmp format setting??VB.net Pin
Dave Kreskowiak17-Dec-03 5:52
mveDave Kreskowiak17-Dec-03 5:52 
GeneralDistributed Application. Pin
srieen17-Dec-03 2:54
srieen17-Dec-03 2:54 
GeneralRe: Distributed Application. Pin
Colin Angus Mackay17-Dec-03 3:19
Colin Angus Mackay17-Dec-03 3:19 
QuestionHow can I with Tabcontrol select/focus any TabPage Pin
jlizardo17-Dec-03 2:50
jlizardo17-Dec-03 2:50 
AnswerRe: How can I with Tabcontrol select/focus any TabPage Pin
Dave Kreskowiak17-Dec-03 5:13
mveDave Kreskowiak17-Dec-03 5:13 
GeneralRe: How can I with Tabcontrol select/focus any TabPage Pin
Member 76608420-Dec-03 18:49
Member 76608420-Dec-03 18:49 
GeneralRe: How can I with Tabcontrol select/focus any TabPage Pin
Dave Kreskowiak21-Dec-03 6:32
mveDave Kreskowiak21-Dec-03 6:32 
GeneralContext menu windows and combo box windows Pin
cnurse17-Dec-03 1:45
cnurse17-Dec-03 1:45 

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.