Home All Groups Group Topic Archive Search About

Type 'OleDbConnection' no define

Author
18 Jan 2006 7:22 AM
bokiteam
Hi All,

I have this error msg, but I have already import lib, could you please
advice?

Imports System.Data.OleDb
Public Class Form1 Inherits System.Windows.Forms.Form
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
....
Error msg:
Type 'OleDbConnection' no define
Type 'OleDbCommand' no define
Type 'OleDbDataReader' no define

Thank you veyr much!
Best regards,
Boki.

Author
18 Jan 2006 8:18 AM
Aaron
Boki,

Drop the Inherits System.Windows.Forms.Form on the public class form1

Aaron

<bokit***@ms21.hinet.net> wrote in message
Show quoteHide quote
news:1137568936.369193.149010@g14g2000cwa.googlegroups.com...
> Hi All,
>
> I have this error msg, but I have already import lib, could you please
> advice?
>
> Imports System.Data.OleDb
> Public Class Form1 Inherits System.Windows.Forms.Form
> Dim cn As OleDbConnection
> Dim cmd As OleDbCommand
> Dim dr As OleDbDataReader
> ...
> Error msg:
> Type 'OleDbConnection' no define
> Type 'OleDbCommand' no define
> Type 'OleDbDataReader' no define
>
> Thank you veyr much!
> Best regards,
> Boki.
>
Author
18 Jan 2006 8:39 AM
bokiteam
Hi Aaron,

Do you mean remove " Inherits System.Windows.Forms.Form" ??

I am not familiar with VB.NET, I need your more description.

Best regards,
Boki.
Author
18 Jan 2006 9:16 AM
Cor Ligthert [MVP]
Boki,

Strange, can you try to describe it as this to see what happens.

> Dim cn As System.Data.OleDb.OleDbConnection
> Dim cmd As System.Data.OleDb.OleDbCommand
> Dim dr As System.Data.OleDb.OleDbDataReader
> ...

Your code should not give an error in my opinion.

Cor
Author
18 Jan 2006 9:37 AM
bokiteam
I will get error when I add this  line:

Imports System.Data.OleDb

Did I miss some LIB or?

Best regards,
Boki.
Author
18 Jan 2006 10:25 AM
Cor Ligthert [MVP]
Boki,

You can see that in your solution explorer at resources.

If it is not there you can rightclick on that and than Add Reference and
follow the box that you see or use Project Add Resources.

I hope this helps,

Cor
Author
19 Jan 2006 4:49 PM
bokiteam
Hi,
I can read a MS ACCESS file in WIN32 app project, but I failed on WINCE
project.

Q1. First, I want to read/write MS ACCESS file in WINCE, it works only
on WIN32 app project now... ( if I want to read MS ACCESS file, I still
have to inlcude "System.Data.Sqlserverce.dll"? )

Q2. I want to read/write SQL data, so what I have to do is include
"System.Data.Sqlserverce.dll" ? and then I will have the most
functions?

Thank you so much for your advice for newbie.

Best regards,
Boki.