LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default How working with Access Databases through Excel 2003 Standar Editi

1.) Show us what you're doing and tell us what happens when you try.

2.) Give this a go.

Dim cnn As ADODB.Connection
Dim strSQL As String
Set cnn = New ADODB.Connection
cnn .Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source='C:\Data\MYDataBase1.mdb'"
strSQL = "DROP TABLE MYTABLE;"
cnn.Execute strSQL
cnn.Close
Set cnn= Nothing


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Dennis" wrote:
| Hello
|
| I have troubles when work with databases through VBA Codes in Excel 2003
| Standar Edition. How or what is the way to do?
|
| Also, the instruction chr(13) not is acceptable in VBA Codes of Excel 2000
| or 2003 Standar Edition.
|
| My example:
|
|
| Dim cnn As New ADODB.Connection
| Set cnn = New Connection
| dbName = ("C:\Data\MYDataBase1.mdb")
| With cnn
| .Provider = "Microsoft.Jet.OLEDB.4.0"
| .Mode = adModeWrite
| .Properties("Jet OLEDB:Database Password") = "abc"
| .Open dbName
| End With
|
| 'Create the recordset
| Dim rs As ADODB.Recordset
| Set rs = New Recordset
|
| 'Determines what records to show
| Dim strSQL As String
| strSQL = "DROP TABLE MYTABLE;"
|
| 'Retreive the records
| rs.CursorLocation = adUseClient
| rs.Open strSQL, cnn
|
| 'close connection
| cnn.Close
| Set cnn = Nothing
| Set rs = Nothing
|


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
office excel 2003 databases/forms ;need to print checks etc JACK Setting up and Configuration of Excel 1 October 1st 09 05:24 PM
how to access databases from excel using ms query and odbc? Nabin Excel Discussion (Misc queries) 0 October 11th 06 07:32 AM
Security for Viewing MS Access Databases From Excel Datasource Sam Wardill Excel Discussion (Misc queries) 0 March 28th 06 03:47 PM
Working with protected Databases Access through Excel Dennis Excel Programming 2 August 16th 05 10:36 PM
Excel 2003, XML, databases and macros MarskiZ Excel Programming 0 July 28th 04 01:35 PM


All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"