using VB 6 with Access 2000 
Author Message
 using VB 6 with Access 2000

Quote:

> With a sixth form class I am using Access 2000 with VB 6.

> I am trying to use ADODC control by posting a name in a text box and
> including that in an SQL string to query a simple (1-table) access
> database.

> I am having trouble with double quotes.  it requires quotes around the
> SQL statement but when I also try to put quotes around a value (e.g.
> WHERE ... =  )it rejects the second level of quotes.  How do i get
> around this?

Have a look at FormatSQL, though you might have to adjust it for ADO:

 URL: http://www.*-*-*.com/ %40tkmsftngp02

Here's a {*filter*} example:

Data1.RecordSource = "select mytable.* from mytable where lastname like " _
  & FormatSQL(SearchName.Text & "%")
Data1.Refresh

--
Joe Foster <mailto:jlfoster%40znet.com>  Wanna buy a Bridge? < http://www.*-*-*.com/ ;
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Tue, 28 Sep 2004 01:24:45 GMT  
 using VB 6 with Access 2000
Sorry I can't find the "Microsoft DAO 3.6 Object library" in my
Project preferences. how to load it? I'm using Access2000 and Windows
2000 with Sp2 installed. i'm also having same king of error,
unrecognized format. Thanx please help.

muadzir
ICT Security Consultant
Tiara Communication Sdn. Bhd. Malaysia


Quote:

> > With a sixth form class I am using Access 2000 with VB 6.

> > I am trying to use ADODC control by posting a name in a text box and
> > including that in an SQL string to query a simple (1-table) access
> > database.

> > I am having trouble with double quotes.  it requires quotes around the
> > SQL statement but when I also try to put quotes around a value (e.g.
> > WHERE ... =  )it rejects the second level of quotes.  How do i get
> > around this?

> Have a look at FormatSQL, though you might have to adjust it for ADO:

>  URL: http://www.*-*-*.com/ %40tkmsftngp02

> Here's a {*filter*} example:

> Data1.RecordSource = "select mytable.* from mytable where lastname like " _
>   & FormatSQL(SearchName.Text & "%")
> Data1.Refresh



Fri, 01 Oct 2004 13:04:17 GMT  
 using VB 6 with Access 2000

Quote:

> Sorry I can't find the "Microsoft DAO 3.6 Object library" in my
> Project preferences. how to load it? I'm using Access2000 and Windows
> 2000 with Sp2 installed. i'm also having same king of error,
> unrecognized format. Thanx please help.

Jet 4.0 might not even be installed properly for VB6, then.  I think
Jet 4.0 compatibility was added with Visual Studio 6.0 Service Pack 5:

 URL:http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/defaul...

(This /shouldn't/ infect your machine with .NET, despite the alarming
logo in the upper left corner...)

Also make sure Jet is up to date on all the machines.  (Install MDAC
first, if you might ever need to install something requiring MDAC!)

 URL:http://microsoft.com/data/download_Jet4SP3.htm

 URL:http://support.microsoft.com/default.aspx?scid=kb;;Q239114

--
Joe Foster <mailto:jlfoster%40znet.com>  "Regged" again? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sat, 02 Oct 2004 04:41:45 GMT  
 using VB 6 with Access 2000
DAO 3.6 does not support Access 2000. Use ADO instead.

Dim db As Connection
  Set db = New Connection
  db.CursorLocation = adUseClient
  db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=bodoh.mdb;"



Sat, 02 Oct 2004 16:30:18 GMT  
 using VB 6 with Access 2000
The cold must have frozen your brain. Of course DAO 3.6 works in Access
2000.

Clive


Quote:
> DAO 3.6 does not support Access 2000. Use ADO instead.

> Dim db As Connection
>   Set db = New Connection
>   db.CursorLocation = adUseClient
>   db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=bodoh.mdb;"



Sat, 02 Oct 2004 18:58:46 GMT  
 using VB 6 with Access 2000

Quote:

> Sorry I can't find the "Microsoft DAO 3.6 Object library" in my
> Project preferences. how to load it? I'm using Access2000 and Windows
> 2000 with Sp2 installed. i'm also having same king of error,
> unrecognized format. Thanx please help.

Best way to update it is to install Service Pack 5 for VB (or VS).
You can get it at:

http://msdn.microsoft.com/vstudio/sp/vs6sp5/

You can also download the database driver install files
separately at:

http://www.microsoft.com/data/download.htm

You need MDAC 2.6 (SDK version, most likely) and
the Jet 4 installer (which does not come with MDAC 2.6).
If you're on Win95, rather than 98 or later, you'll need
the DCOM95 package, too, but that came with IE 4.1,
and you need IE 5+ to read the documentation, so your
best bet on that is to update to 5.5 (which is the latest
version that will install on Win95) or update to a newer
version of Windows.

Also: Very Important: Go to
"How to control which MDAC Version the PDW Distributes"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q217754

to make sure you distribute the correct version in your
install package. (Service Pack 5 will do all this automatically,
and is much recommended over doing it manually.)

Terry Austin



Sat, 02 Oct 2004 23:28:30 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Using VB 6 with Access 2000

2. Importing an Access 2000 table into another Access 2000 database with VB Code

3. Distributing VB/Access 2000 Apps to non Access 2000 owners

4. Automating email function within Word 2000 using Access 2000

5. Need Help Manipulating Excel 2000 from Access 2000 using VBA

6. Using Access 2000 Database on VB 6

7. Querying an access 2000 db using VB

8. using vb to set and unset password for access 2000 database

9. Replication in VB using Access 2000

10. Need help using Access 2000 and VB 6

11. Need help using Access 2000 and VB 6

12. Encrypting data inside Access 2000 using VB?

 

 
Powered by phpBB® Forum Software