Silakan tunggu sedang proses
Kamis Pon 02 April 2020 17:10
learn make rich
share make it perfect
Ayat Suci
Dan dalam qishaash itu ada (jaminan kelangsungan) hidup bagimu, hai orang-orang yang berakal, supaya kamu bertakwa.

 otomatis refresh

Javascript ayat
Para Rekan
User online: 48
User login: 0
user/passwd: bpuser

Daftar ConnectionString

Setelah Eko Heri membahas bagaimana membuat UDL, ini adalah daftar lengkap untuk Connection String

Aryo Sanjaya <h1>Coeg</h1>
Kamis Legi, 23 Juni 2005

Diambil dari


Generally, one of the first steps when you are trying to work with databases is open it. You can find several types of those, and each have a different mode of connection. When you try to connect with your database sometimes, you don't know the correct connection string that you must use. It is for that I wrote this article. I wanted to compile the connection strings to the majority of known databases...

ODBC DSN Less Connection

ODBC Driver for dBASE

strConnection = _T("Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;"

Note: You must specify the filename in the SQL statement... For example:

CString strQuery = _T("Select Name, Address From Clients.dbf");

ODBC Driver for Excel

strConnection = _T("Driver={Microsoft Excel Driver (*.xls)};DriverId=790;"

ODBC Driver for Text

strConnection = _T("Driver={Microsoft Text Driver (*.txt; *.csv)};"

If you are using tab delimited files, you must create the schema.ini file, and you must inform the Format=TabDelimited option in your connection string.

Note: You must specify the filename in the SQL statement... For example:

CString strQuery = _T("Select Name, Address From Clients.csv");

Visual FoxPro

If you are using a database container, the connection string is the following:

strConnection = _T("Driver={Microsoft Visual Foxpro Driver};UID=;"

If you are working without a database container, you must change the SourceType parameter by DBF as in the following connection string:

strConnection = _T("Driver={Microsoft Visual Foxpro Driver};UID=;"

ODBC Driver for Access

strConnection = _T("Driver={Microsoft Access Driver (*.mdb)};"

If you are using a Workgroup (System database): you need to inform the SystemDB Path, the User Name and its password. For that, you have two solutions: inform the user and password in the connection string or in the moment of the open operation. For example:

strConnection = _T("Driver={Microsoft Access Driver (*.mdb)};"
        "Dbq=C:\\VC Projects\\ADO\\Samples\\AdoTest\\dbTestSecurity.mdb;"
        "SystemDB=C:\\Program Files\\Microsoft Office\\Office\\SYSTEM.mdw;"
        "Uid=Carlos Antollini;Pwd=carlos");

or may be:

strConnection = _T("Driver={Microsoft Access Driver (*.mdb)};"
        "Dbq=C:\\VC Projects\\ADO\\Samples\\AdoTest\\dbTestSecurity.mdb;"
        "SystemDB=C:\\Program Files\\Microsoft Office\\Office\\SYSTEM.mdw;");
if(pDB.Open(strConnection, "DatabaseUser", "DatabasePass"))

If you want to open in Exclusive mode:

strConnection = _T("Driver={Microsoft Access Driver (*.mdb)};"

ODBC Driver for SQL Server

For Standard security:

strConnection = _T("Driver={SQL Server};Server=MyServerName;"

For Trusted Connection security (Microsoft Windows NT integrated security):

strConnection = _T("Driver={SQL Server};Server=MyServerName;"

Also, you can use the parameter Trusted_Connection that indicates that you are using the Microsoft Windows NT Authentication Mode to authorize user access to the SQL Server database. For example:

strConnection = _T("Driver={SQL Server};Server=MyServerName;"

If the SQL Server is running in the same computer, you can replace the name of the server by the word (local) like in the following sample:

strConnection = _T("Driver={SQL Server};Server=(local);"

If you want to connect with a remote SQL Server, you must inform the address, the port, and the Network Library to use:

The Address parameter must be an IP address and must include the port. The Network parameter can be one of the following:

  • dbnmpntw Win32 Named Pipes
  • dbmssocn Win32 Winsock TCP/IP
  • dbmsspxn Win32 SPX/IPX
  • dbmsvinn Win32 Banyan Vines
  • dbmsrpcn Win32 Multi-Protocol (Windows RPC)

For more information, see Q238949.

strConnection = _T("Driver={SQL Server};Server=;"

ODBC Driver for Oracle

For the current Oracle ODBC driver from Microsoft:

strConnect = _T("Driver={Microsoft ODBC for Oracle};;"

For the older Oracle ODBC driver from Microsoft:

strConnect = _T("Driver={Microsoft ODBC Driver for Oracle};"

ODBC Driver for MySQL

If you want to connect to a local database, you can use a connection string like the following:

strConnect = _T("Driver={MySQL ODBC 3.51 Driver};Server=localhost;"

If you want to connect with a remote database, you need to specify the name of the server or its IP in the Server parameter. If the Port is distinct to 3306 (default port), you must specify it.

strConnect = _T("Driver={mySQL ODBC 3.51 Driver};Server=MyRemoteHost;"

The parameter Option can be one or more of the following values:

  • 1 - The client can't handle that MyODBC returns the real width of a column.
  • 2 - The client can't handle that MySQL returns the true value of affected rows. If this flag is set then MySQL returns 'found rows' instead. One must have MySQL 3.21.14 or newer to get this to work.
  • 4 - Make a debug log in c:\myodbc.log. This is the same as putting MYSQL_DEBUG=d:t:O,c::\myodbc.log in AUTOEXEC.BAT.
  • 8 - Don't set any packet limit for results and parameters.
  • 16 - Don't prompt for questions even if driver would like to prompt.
  • 32 - Enable or disable the dynamic cursor support. This is not allowed in MyODBC 2.50.
  • 64 - Ignore use of database name in 'database.table.column'.
  • 128 - Force use of ODBC manager cursors (experimental).
  • 256 - Disable the use of extended fetch (experimental).
  • 512 - Pad CHAR fields to full column length.
  • 1024 - SQLDescribeCol() will return fully qualified column names.
  • 2048 - Use the compressed server/client protocol.
  • 4096 - Tell server to ignore space after function name and before '(' (needed by PowerBuilder). This will make all function names keywords!
  • 8192 - Connect with named pipes to a MySQLd server running on NT.
  • 16384 - Change LONGLONG columns to INT columns (some applications can't handle LONGLONG).
  • 32768 - Return 'user' as Table_qualifier and Table_owner from SQLTables (experimental).
  • 65536 - Read parameters from the client and ODBC groups from my.cnf.
  • 131072 - Add some extra safety checks (should not be needed but...).

If you want to have multiple options, you should add the above flags! For example: 16 + 1024 = 1030 and use Option= 1030;.

For more information, go to MyODBC Reference Manual.

ODBC Driver for AS400

strConnect = _T("Driver={Client Access ODBC Driver (32-bit)};System=myAS400;"

ODBC Driver for SyBase

strConnect = _T("Driver={Sybase System 10};Srvr=MyServerName;Uid=MyUsername;"

ODBC Driver for Sybase SQL AnyWhere

strConnect = _T("ODBC;Driver=Sybase SQL Anywhere 5.0;"

DSN Connection


strConnect = _T("DSN=MyDSN;Uid=MyUsername;Pwd=MyPassword;");

OLE DB Provider

OLE DB Provider for SQL Server

For Standard security:

strConnect = _T("Provider=sqloledb;Data Source=MyServerName;"
        "Initial Catalog=MyDatabaseName;"
        "User Id=MyUsername;Password=MyPassword;");

For Trusted Connection security (Microsoft Windows NT integrated security):

strConnect = _T("Provider=sqloledb;Data Source=MyServerName;"
        "Initial Catalog=MyDatabaseName;"
        "Integrated Security=SSPI;");

If you want to connect to a "Named Instance" (SQL Server 2000), you must to specify Data Source=Servere Name\Instance Name like in the following example:

strConnect = _T("Provider=sqloledb;Data Source=MyServerName\MyInstanceName;"
    "Initial Catalog=MyDatabaseName;User Id=MyUsername;Password=MyPassword;");

If you want to connect with a SQL Server running on the same computer, you must specify the keyword (local) in the Data Source like in the following example:

strConnect = _T("Provider=sqloledb;Data Source=(local);"
        "Initial Catalog=myDatabaseName;"
        "User ID=myUsername;Password=myPassword;");

To connect to SQL Server running on a remote computer (via an IP address):

strConnect = _T("Provider=sqloledb;Network Library=DBMSSOCN;"
        "Data Source=,1433;"
        "Initial Catalog=MyDatabaseName;User ID=MyUsername;"

OLE DB Provider for MySQL (By Todd Smith)

strConnection = _T("Provider=MySQLProv;Data Source=test");

Where test is the name of MySQL database. Also, you can replace the name of the database by the following connection string: server=localhost;DB=test.

OLE DB Provider for AS400

strConnect = _T("Provider=IBMDA400;Data source=myAS400;User Id=myUsername;"

For more information, see: Using the OLE DB Provider for AS/400 and VSAM.

OLE DB Provider for Active Directory

strConnect = _T("Provider=ADSDSOObject;User Id=myUsername;Password=myPassword;");

For more information, see: Microsoft OLE DB Provider for Microsoft Active Directory Service.

OLE DB Provider for DB2

If you are using a TCP/IP connection:

strConnect = _T("Provider=DB2OLEDB;Network Transport Library=TCPIP;"
        "Network Address=;"
        "Initial Catalog=MyCatalog;Package Collection=MyPackageCollection;"
        "Default Schema=MySchema;User ID=MyUsername;Password=MyPassword;");

If you are using APPC connection:

strConnect = _T("Provider=DB2OLEDB;APPC Local LU Alias=MyLocalLUAlias;"
        "APPC Remote LU Alias=MyRemoteLUAlias;Initial Catalog=MyCatalog;"
        "Package Collection=MyPackageCollection;Default Schema=MySchema;"
        "User ID=MyUsername;Password=MyPassword;");

For more information, see: Using the OLE DB Provider for DB2.

OLE DB Provider for Microsoft Jet

  • Connecting to an Access file using the JET OLE DB Provider:

    Using Standard security:

    strConnect = _T("Provider=Microsoft.Jet.OLEDB.4.0;"
            "Data Source=C:\\DatabasePath\\MmDatabase.mdb;"
            "User Id=admin;Password=;");

    If you are using a Workgroup (System database):

    strConnect = _T("Provider=Microsoft.Jet.OLEDB.4.0;"
            "Data Source=C:\\DataBasePath\\mydb.mdb;"
            "Jet OLEDB:System Database=MySystem.mdw;");
    pRs.Open(strConnect, "MyUsername", "MyPassword");
  • Connecting to an Excel Spreadsheet using the JET OLE DB Provider:
    strConnect = _T("Provider=Microsoft.Jet.OLEDB.4.0;"
            "Data Source=C:\\DatabasePath\\DBSpreadSheet.xls;"
            "Extended Properties=\"\"Excel 8.0;HDR=Yes;\"\";");

    Note: If "HDR=Yes", the provider will not include the first row of the selection into the recordset. If "HDR=No", the provider will include the first row of the cell range (or named ranged) into the recordset.

    For more information, see: Q278973.

  • Connecting to a Text file using the JET OLE DB Provider:
    strConnect = 
            _T("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\DatabasePath\\;"
            "Extended Properties=\"\"text;"

    Note: You must specify the filename in the SQL statement... For example:

    CString strQuery = _T("Select Name, Address From Clients.txt");

    For more information, see: Q262537.

  • Connecting to an Outlook 2000 personal mail box using the JET OLE DB Provider: (By J. Cardinal)
    strConnect = _T("Provider=Microsoft.Jet.OLEDB.4.0;Outlook 9.0;"

    Replace c:\temp with any temporary folder. It will create a schema file in that folder when you open it which shows all the fields available. Blank MAPILEVEL indicates top level of folders).

  • Connecting to an Exchange mail box through JET: (By J. Cardinal)
    strConnect = _T("Provider=Microsoft.Jet.OLEDB.4.0;Exchange 4.0;"
          "MAPILEVEL=Mailbox - Pat Smith|;DATABASE=C:\\Temp\\;")

    You must replace c:\temp with any temporary folder.

    Replace Pat Smith with the name of the mail box and you must keep vertical pipe character | to indicate top level of folders. Place sub folder after vertical pipe if accessing specific folder.

    Note: you can enter queries against the mail store just like a database... For example:

    CString strQuery = _T("SQL "SELECT Contacts.* FROM Contacts;");

    For more information, see: The Jet 4.0 Exchange/Outlook IISAM.

OLE DB Provider for ODBC Databases

If you want to connect with a Microsoft Access database:

strConnect = _T("Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};"

If you want to connect with a SQL Server database:

strConnect = _T("Provider=MSDASQL;Driver={SQL Server};Server=MyServerName;"

If you want to use DSN:

strConnect = _T("Provider=MSDASQL;PersistSecurityInfo=False;"
        "Data Source=MyDSN;catalog=MyDatabase;");

For more information, see: Microsoft OLE DB Provider for ODBC.

OLE DB Provider for OLAP

Microsoft® OLE DB for Online Analytical Processing (OLAP) is a set of objects and interfaces that extends the ability of OLE DB to provide access to multidimensional data stores.

strConnect = _T("Provider=MSOLAP;Data Source=MyOLAPServerName;"
     "Initial Catalog=MyOLAPDatabaseName;");
Connection using HTTP:

This feature enables a client application to connect to an Analysis server through Microsoft® Internet Information Services (IIS) by specifying a URL in the Data Source property in the client application's connection string. This connection method allows PivotTable® Service to tunnel through firewalls or proxy servers to the Analysis server. A special Active Server Pages (ASP) page, Msolap.asp, enables the connection through IIS. The directory in which this file resides must be included as part of the URL when connecting to the server (for example,

Using a URL
strConnect = _T("Provider=MSOLAP;Data Source=http://MyOLAPServerName/;"
     "Initial Catalog=MyOLAPDatabaseName;");
Using SSL
strConnect = _T("Provider=MSOLAP;Data Source=https://MyOLAPServerName/;"
     "Initial Catalog=MyOLAPDatabaseName;");

For more information, see: OLE DB for OLAP, Connecting Using HTTP.

OLE DB Provider for Oracle

OLE DB Provider for Oracle (from Microsoft)

The Microsoft OLE DB Provider for Oracle allows ADO to access Oracle databases.

strConnect = _T("Provider=MSDAORA;Data Source=MyOracleDB;User Id=myUsername;"

For more information, see: Microsoft OLE DB Provider for Oracle.

OLE DB Provider for Oracle (from Oracle).

For Standard security:

strConnect = _T("Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;"
        "User Id=myUsername;Password=myPassword;");

For a Trusted connection:

  • OS Authenticated connect setting user ID to "/":
    strConnect = _T("Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;"
       "User Id=/;Password=;");
  • OS Authenticated connect using OSAuthent:
    strConnect = _T("Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;")

    Note: "Data Source=" must be set to the appropriate Net8 name which is known to the naming method in use. For example, for Local Naming, it is the alias in the tnsnames.ora file; for Oracle Names, it is the Net8 Service Name.

For more information, see: Oracle Provider for OLE DB Developer's Guide.

OLE DB Provider for Visual FoxPro

strConnect = _T("Provider=vfpoledb;"
     "Data Source=C:\\DatabasePath\\MyDatabase.dbc;");

For more information, see: Microsoft OLE DB Provider for Visual FoxPro.

OLE DB Provider for Index Server (By Chris Maunder)

strConnect = _T("provider=msidxs;Data Source=MyCatalog;");

For more information, see: Microsoft OLE DB Provider for Microsoft Indexing Service.

OLE DB Data Link Connections

Data Link File - UDL

strConnection = _T("File Name=c:\\DataBasePath\\DatabaseName.udl;");

If you want to create a Data Link File, you can make a new empty text file, change its extension by .udl, then double click over the file, and the operating system calls for you the Data Link app.

[ Data Link Application ]

Author: Carlos Antollini

Carlos Antollini is a software engineer working on Object Oriented, Visual C++, MFC, COM, ATL, ADO, Internet technologies, OLAP, MS-SQLServer and Cyrillic Languages.
Carlos is originally from Argentina, he was living by a couple of years in Fort Lauderdale, Florida, working for Citibank. Then he started his own business.
Carlos is the creator of piFive[^], a family of BI Analytic Platform software, that it deals next to, latinsys[^], his partner in businesses...

Click here to view Carlos Antollini's online profile.



Kamis Pahing, 29 Juni 2006

aku coba ini buat akses (terpassword) vs. delphi jg bisa :D :

//hahaha nulisnya susah (mas saran nih : kolom komentar bisa dilebarin dikit ngga ?)



Sip2, makasih infonya ;)

Dilebarkan ya? hmm... gimana kalo dibikin 2 kolom saja ya, lebih longgar kayaknya. *mikir*


Jum'at Pahing, 9 Mei 2008

mau nanya...
saya pake database sybase, dan di komputer saya sendiri jalan dgn bae2 aja
cm, sumhow di beberapa komp laen ga bisa jalan..
ini dipake buat connect pivot OWC ke database

ad yg error msg di pivot nya: 'na' (network address)
ad yg muncul alert javascript kl ga bisa connect...

kira2 tau ga napa >.<

btw, kira2 connectionstring ny :

("Driver={Sybase System 10};Srvr=MyServerName;DB=database;Uid=MyUsername;"


Selasa Legi, 26 Agustus 2008

CpBcX2 sdlfRnd6M2HvO4


Sabtu Pon, 6 Desember 2008


taek lu

Sabtu Legi, 7 Februari 2009

taek lah lu ... gini doank di-repost ke blog pribadi setan!!! nyape2in gw gugling dan klak-klik nyasar ke sini!!! dasar sampah masyarakat!!!!


Senin Pahing, 4 Mei 2009

Pak saya ingin coba membuat aplikasi dengan delphi untuk agar bisa mengeksekusi mysqldump atau gimana yA? tolong dund jawabannya di kirim ke e-mail saya...


Selasa Pon, 9 Juni 2009

hjhggg6642 test test


Rabu Wage, 10 Juni 2009

ghhhh5432 gfhg ghfgffff


Kamis Kliwon, 11 Juni 2009

dsfsdfs67877 test test

Mengisi Komentar

untuk kode program, apit dengan tanda [code][/code].

(kode program)

Daftar Artikel Lain-lain

» Membuat Variabel Pada Javascript Berfungsi Sama Dengan Variabel $_GET Pada PHP (51)
Minggu Wage, 23 Desember 2007

Kita bisa membuat variabel yang mempunyai sifat sama dengan $_GET pada PHP dengan menggunakan Javascript sehingga untuk menangkap variabel yang dilemparkan dari URL tidak perlu menggunakan PHP lagi

» MIDlet: Mencari Neptu dan Pasaran (140)
Jum'at Kliwon, 17 Februari 2006

Bagi yang suka perhitungan jawa (neptu), akan terbantu dengan menggunakan aplikasi kecil ini

» MovableType Plugin: SimpleLink (81)
Kamis Pahing, 1 Desember 2005

Contoh pembuatan PlugIn untuk MovableType, sebuah Blogger Engine dengan menggunakan pemrograman PERL.

» Google Earth (63)
Kamis Pahing, 27 Oktober 2005

Menjelajahi bumi dan melihat bentuk permukaannya, melihat kota-kota dan gunung-gunung besar

» Desain Table dengan Excel (121)
Rabu Wage, 6 Juli 2005

Tips untuk mempermudah dalam melakukan desain tabel melalui Microsoft Excel

Halaman:    1  2  3  ... 5  >  

Account Data
Anda belum login.


Login hanya diperlukan bagi kontributor untuk mengisi artikel/berita dan mengupload file/gambar
Status Y!M
Saya sedang Offline. Silakan gunakan menu Kontak atau tinggalkan pesan di Yahoo! Messenger pada Id: aryo_sanjaya
Artikel Rame
Aplikasi Handphone (675)
Senin Pon, 20 Februari 2006

Mengirim SMS dari PC (463)
Senin Wage, 28 November 2005

Membaca SMS dari PC (439)
Selasa Pahing, 14 Juni 2005

Source SMS Autorespond (342)
Senin Legi, 24 April 2006

Barcode Reader (163)
Sabtu Pahing, 20 Januari 2007

» addin
Kamis Wage
30 Juli 2009

» shen
Senin Legi
27 Juli 2009

» iyha
Rabu Wage
15 Juli 2009

» wawan
Rabu Kliwon
1 Juli 2009

» fuad hasan
Minggu Kliwon
21 Juni 2009

Halaman Bukutamu
Daftar Fungsi
Mencari nama hari dan nama pasaran
Konversi dari PDU ke Teks SMS
Membaca RSS dari beberapa situs
Jejak Halaman
© 2005-2020