程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SyBase數據庫 >> SyBase綜合文章 >> ODBC 應用與SQL Anywhere Server或SQL Anywhere 獨立引擎的互連

ODBC 應用與SQL Anywhere Server或SQL Anywhere 獨立引擎的互連

編輯:SyBase綜合文章

Connecting an ODBC enabled application to an SQL Anywhere Server or SQL Anywhere Standalone Engine.

SUMMARY: Connecting an ODBC enabled application to an SQL Anywhere Server or SQL Anywhere Standalone Engine. Document ID: 20180 Last Revised: 08/21/98 Topic: Additional Topics Document Type: TechNote Product: PowerBuilder, SQL Anywhere Version: 5.0; 5.5 Platform: PC, Novell Operating System: DOS, OS/2, Netware, Windows 95, Windows NT, Windows 3.1

Document:

  ClIEnt/Server Environment:

  First: Start the SA Server application: See "I" below. Second: Test Outside of ODBC. Start SA Client Application. See "II" below. Third: Test using Embedded SQL utility: ISQL. See "III" below. Fourth: Close down SA ClIEnt and SA ISQL and use ODBC setup. See "IV" below. Last: Start ODBC enabled application.

  Standalone Environment:

  First: Start SA Standalone Engine application: See "V" below. Second:

Test Outside of ODBC. Run Embedded SQL utility: ISQL. See "III" below. Third: Close down SA ISQL and use ODBC setup. See "IV" below. Last: Start ODBC enabled application.

  I. SQL Anywhere Server

  See OnLineHelp (SA NetWork Guide):"Running the database server executable" and "Network communications parameters"

  Starting SQL Anywhere Server Application from:

  A) a command line - Enter: ...\dbsrv50?.??? -x -n ...\full\path\to\ -n ...\full\path\to\ -n Example (WinNT/Win95/DOS/OS2/QNX): C:\sqlany50\win32\dbsrv50.exe -x tcpip -n naMe c:\sqlany50\sademo.db -n jack d:\sqlany50\cash.db -n jill Example (Win3.x): C:\sqlany50\win\dbsrv50w.exe -x tcpip -n naMe d:\sqlany50\sademo.db -n jack d:\sqlany50\cash.db -n jill Example (Novell Netware 3.x/4.x): Load sys:\system\dbsrv50.nlm -x tcpip -n naMe sys:\system\dbsample\sademo.db -n jack sys:\system\cash\cash.db -n jill If server starts and loads database, continue with SA ClIEnt; otherwise determine why not. See OnLineHelp ( SA NetWork Guide): "Troubleshooting"

  B) WinNT Service - Enter: . Run ...\dbsvmn50.exe . Select 'new'. . Select Service Type...: 'Network Server' . Enter service name: {not PC server name} . Enter dbsrv50 parameters: . -x tcpip -n naMe c:\sqlany50\sademo.db -n jack d:\sqlany50\cash.db -n jill Path for executable: C:\sqlany50\win32\dbsrv50.exe If server starts and loads database, continue with SA ClIEnt ; otherwise dete


您正在看的Sybase教程是:ODBC 應用與SQL Anywhere Server或SQL Anywhere 獨立引擎的互連。rmine why not. See OnLineHelp (SA NetWork Guide): "Running the database server as an NT service"

  II. SQL Anywhere ClIEnt

  See OnLineHelp (SA NetWork Guide): "Running the SQL Anywhere ClIEnt"

  Starting SQL Anywhere ClIEnt Application from:

  a command line - Enter: ...\dbclIEn?

.exe -x {} Example (WinNT/Win95/DOS/OS2): c:\sqlany50\dbclIEnt.exe -x tcpip{dobroadcast=no,host=myip=} naMe c:\sqlany50\dbclient.exe -x tcpip{dobroadcast=no,host=123.321.213.312;myip=321.123. 312.213} naMe If 'clIEnt' finds 'server', continue with SA ISQL; otherwise determine why not. See OnLineHelp (SA NetWork Guide): "Troubleshooting" and Technical Document 42396.

  III. SQL Anywhere ISQL

  Run ISQL/W from a command line:

  ...\isql.exe -c "uid=pwd=" Example (WinNT/Win95): C:\SQLANY50\win32\isql.exe -c "uid=dba;pwd=sql" In ISQL command window, enter: select * from execute - If data is retrieved, shut down SA ClIEnt and SA ISQL and continue with ODBC; otherwise determine why not. See OnLineHelp (SA User's Guide): "The ISQL utility" IV. SQL Anywhere and ODBC

  See OnLineHelp (SA User's Guide): "Adding an ODBC data source" and ODBC 'Help' CB on ODBC Administrator utility

  Configure ODBC:

  If all of the above works successfully then close 'isql' and close 'dbclIEnt'. Setup the following ODBC configuration, by running either ...\ODBCADM.EXE (16bit) or ...\ODBCAD32.EXE (32bit). Example (WinNT/Win95): ...\odbc32ad.exe A. Click the 'add' CB. B. Double click the 'Sybase SQL Anywhere driver 5.0'. C. In the 'SQL Anywhere ODBC configuration' dialog box, enter the following information:

  1. Data Source Name:
  2. Description: - optional-
  3. User ID: - May be entered elsewhere for security purposes.
  4. PassWord: - May be entered elsewhere for security purposes.
  5. Server name: naMe - From SA Server or Standalone Engine command line.
  6. Database Name: jack or jil

l - From SA Server or Standalone Engine command line
  7. Standalone only - Database File: c:\sqlany50\sademo.db.
  8. Server only - Click 'Network' RB then, Click 'Custom' RB
  9. Standalone only - Click 'Local' RB then, Click 'Custom' RB
  10. Click 'Options' CB.
  11. Server only - Verify that 'start command window' shows the correct fully qualified path to dbclien50.exe. Complete the information so that the finalcommand looks like: ...\dbclIEn?.exe -x {} Example (WinNT/Win95): c:\sqlany50\dbclIEnt.exe -x tcpip{dobroadcast=no,host=myip= } c:\sqlany50\dbclIEnt.exe -x tcpip{dobroadcast=no,host=123.321.213.312;myip= 321.123.312.213}
  12. Standalone only -Verify that 'start command window' shows the correct fully qualifIEd path to dbeng50?.exe. Complete the information so that the finalcommand looks l


您正在看的Sybase教程是:ODBC 應用與SQL Anywhere Server或SQL Anywhere 獨立引擎的互連。ike: ...\dbeng50?.??? -n ...\full\path\to\ -n ...\full\ path\to\ -n Example (WinNT/Win95/DOS): C:\sqlany50\win32\dbeng50.exe -n naMe c:\sqlany50\sademo.db -n jack d:\sqlany50\cash.db -n jill
  13. Click 'OK' CB until out of ODBC administrator (usually 3 times) D. Make any necessary adjustments to the ODBC enabled application, then run it.

  V. SQL Anywhere Standalone Engine

  See OnLineHelp (SA User's Guide): "The database engine"

1. Starting SQL Anywhere Standalone Application from:

  a command line - Enter: ...\dbeng50?.??? -n ...\full\path\to\ -n ...\full\path\to\ -n Example (WinNT/Win95/DOS): C:\sqlany50\win32\dbeng50.exe -n naMe c:\sqlany50\sademo.db -n jack d:\sqlany50\cash.db -n jill Example (Win3.x): C:\sqlany50\win\dbeng50w.exe -n naMe d:\sqlany50\sademo.db -n jack d:\sqlany50\cash.db -n jill

2. Run ISQL/W from a command line:

  See III above.

3. Configure ODBC:

  See IV above.

  NOTE: These are basic examples. Please see ODBCADM.EXE / ODBCAD32.EXE OnLineHelp and SQL Anywhere OnLineHelp for detailed information

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved