-

   rss_sql_ru_access_programming

 - e-mail

 

 -

 LiveInternet.ru:
: 16.03.2006
:
:
: 4

:


ActiveX: 'ADODB.Connection'

, 13 2014 . 17:07 +
, .

, , MS Access. , . , ADO .
VBS- , .

Option Explicit

'    .      ( , )    Access
Dim DBFile : DBFile = ChooseFile("C:\Documents and Settings\Futen\ \samo-agent\Ag.7.1.mdb") 

Dim  Catalog, objConn, SQuery

Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = ConnectString
objConn.Open
Dim RecordsAffected
objConn.Execute "select * from [version]"
' 
objConn.Close
Set objConn = Nothing

' MsgBox "  ", vbInformation + vbOKOnly

'  
Function ChooseFile(StartName)
    Dim Str : Str = InputBox(" ", "  ", StartName)
    If Len(Str) = 0 Then
	    Wscript.Quit
	End If
	 
	ChooseFile = Str        
End Function

Function ConnectString()
    ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & DBFile & ";"
End Function   


AccessDatabaseEngine MDAC .. ? . , 3

http://www.sql.ru/forum/1094346/nevozmozhno-sozdanie-obekta-konteynerom-activex-adodb-connection


: [1] []
 

:
: 

: ( )

:

  URL