Click here to Skip to main content
15,914,165 members
Home / Discussions / Database
   

Database

 
QuestionAm I missing a header file? Pin
IlanTal31-Mar-05 23:31
IlanTal31-Mar-05 23:31 
AnswerRe: Am I missing a header file? Pin
Colin Angus Mackay1-Apr-05 7:37
Colin Angus Mackay1-Apr-05 7:37 
QuestionHow do I COMMIT an oracle temp table thru ado.net Pin
phil.short31-Mar-05 10:50
phil.short31-Mar-05 10:50 
GeneralSQL challenge Pin
Chris Losinger31-Mar-05 4:04
professionalChris Losinger31-Mar-05 4:04 
GeneralRe: SQL challenge Pin
Colin Angus Mackay31-Mar-05 4:18
Colin Angus Mackay31-Mar-05 4:18 
GeneralRe: SQL challenge Pin
Chris Losinger31-Mar-05 5:15
professionalChris Losinger31-Mar-05 5:15 
Questionparameterized queries? Pin
IlanTal31-Mar-05 3:31
IlanTal31-Mar-05 3:31 
AnswerRe: parameterized queries? Pin
IlanTal31-Mar-05 18:38
IlanTal31-Mar-05 18:38 
The problem I refer to above boils down to the fact that it doesn't know "As OleDbConnection", "As OleDbCommand" or "As OleDbDataAdapter" in mysub().
It knows the same functions as New commands, and it works find with Button1_Click which actually uses OleDbConnection1, sty1 (an OleDbDataAdapter) and stds (a Dataset).
I can't figure out why it gives me the compilation errors. If it were a C++, I would say some include file is missing.
Below is the code, and I'm stuck.....
Thanks for any help.


Public Class Form1
Inherits System.Windows.Forms.Form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OleDbConnection1.Open()
sty1.Fill(stds, "studies")
OleDbConnection1.Close()
End Sub
Private Sub mysub()
Dim nwindConn As OleDbConnection = New OleDbConnection("Provider=SQLOLEDB;Data Source=localhost;" & _
"Integrated Security=SSPI;Initial Catalog=northwind")

Dim selectCMD As OleDbCommand = New OleDbCommand("SELECT CustomerID, CompanyName FROM Customers", nwindConn)
selectCMD.CommandTimeout = 30
Dim custDA As OleDbDataAdapter = New OleDbDataAdapter

End Sub
End Class

GeneralReading BLOB data from database Pin
Member 165844231-Mar-05 1:37
Member 165844231-Mar-05 1:37 
GeneralRe: Reading BLOB data from database Pin
Member 165844211-Apr-05 2:57
Member 165844211-Apr-05 2:57 
QuestionReporting Service - bug with drilldown? Pin
devvvy30-Mar-05 23:56
devvvy30-Mar-05 23:56 
GeneralNHibernate Child-Parent relationship -- Key happens to be a composite key Pin
devvvy29-Mar-05 23:23
devvvy29-Mar-05 23:23 
GeneralPackage and deployment Pin
Salman Sheikh29-Mar-05 19:00
Salman Sheikh29-Mar-05 19:00 
GeneralLaunching SQL Server job xp_cmdshell Pin
devvvy29-Mar-05 17:32
devvvy29-Mar-05 17:32 
GeneralOracleClient and Timestamp datatype Pin
Yos Nugroho29-Mar-05 17:21
Yos Nugroho29-Mar-05 17:21 
GeneralGUIDs as PK's Pin
Marc Clifton29-Mar-05 10:04
mvaMarc Clifton29-Mar-05 10:04 
GeneralRe: GUIDs as PK's Pin
rwestgraham29-Mar-05 10:25
rwestgraham29-Mar-05 10:25 
GeneralRe: GUIDs as PK's Pin
Carl Mercier1-Apr-05 10:24
Carl Mercier1-Apr-05 10:24 
GeneralRe: GUIDs as PK's Pin
Marc Clifton4-Apr-05 5:16
mvaMarc Clifton4-Apr-05 5:16 
GeneralRe: GUIDs as PK's Pin
Andy Brummer29-Mar-05 11:14
sitebuilderAndy Brummer29-Mar-05 11:14 
GeneralRe: GUIDs as PK's Pin
turbochimp29-Mar-05 19:19
turbochimp29-Mar-05 19:19 
GeneralRe: GUIDs as PK's Pin
Scott Serl30-Mar-05 13:58
Scott Serl30-Mar-05 13:58 
GeneralRe: GUIDs as PK's Pin
Michael P Butler31-Mar-05 6:24
Michael P Butler31-Mar-05 6:24 
GeneralRe: GUIDs as PK's Pin
Michael Potter1-Apr-05 4:56
Michael Potter1-Apr-05 4:56 
GeneralRe: GUIDs as PK's Pin
Carl Mercier1-Apr-05 10:27
Carl Mercier1-Apr-05 10:27 

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.