| By José Ramos | Article Rating: |
|
| October 10, 2007 12:00 PM EDT | Reads: |
16,586 |
To make a schema change, start by opening the Database Explorer Perspective.
1. Click Window | Open Perspective | Database Explorer
2. Ensure that you have the Database Explorer view active
• If not, you can click Window | Show View | Database Explorer
3. Inside the Database Explorer view
• Expand the connection profile that contains the database you wish
to alter, and then expand the database. Right-click on folders in the
submenu to see the available options
• Example: Right-click on Tables, and select New Table
o Enter as many columns as you like, then right-click and select Save Table
o Enter a name for the new table and then click OK
The Database Explorer perspective lets you make all the schema changes necessary to your database. You can also use it to write stored procedures and functions, as well as SQL Anywhere Server Web Services.
Querying a SQL Anywhere Database
With Sybase WorkSpace's Interactive SQL view, you can send any query to the active SQL Anywhere Server database.
1. Open the Database Explorer perspective
• Click Window | Open Perspective | Database Explorer
2. Right-click on your desired database in the left explorer pane, click Set as Active Database
3. In the bottom-right view, click the ISQL Session tab
4. Enter a valid SQL query
5. Right-click on the view and select Execute
The view will automatically switch to the Results tab when you execute a query. There you can view all rows and columns returned from the query.
Debugging a Stored Procedure
Sybase WorkSpace can be used to debug a SQL Anywhere stored procedure.
1. Open the Database Development perspective
• Click Window | Open Perspective | Database Development
2.
In the Database Explorer view, right-click on the asaDemo database you
connected to in the Getting Started section of this tutorial, select
Set as Active Database. Also disconnect from all other databases
3. Expand the Procedures and Functions folder, right-click on the debugger_tutorial procedure, and select Debug Procedure
4. This will open a file that contains the store procedure definition.
Right-click somewhere on the grey sidebar of that window and select
Toggle Breakpoint
5. Right-click on the view and select Debug
6. Select Yes to open the Database Debug perspective
In this perspective you can step through your stored procedure and methodically search for problems or verify requirements.
Summary
This tutorial explained how to set up Sybase WorkSpace and how to do the following in the development environment:
• Connect to a SQL Anywhere database
• Create a new database
• Make schema changes to a database
• Query a database
• Debug a stored procedure
This is a very brief introduction to the vast range of features offered by Sybase WorkSpace. To learn more about the product, please download the trial version and try out some of the samples and tutorials in the online documentation.
Trial version:
www.sybase.com/products/development/workspace
Documentation:
http://sybooks.sybase.com/nav/detail.do?docset=1303
Published October 10, 2007 Reads 16,586
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By José Ramos
José Ramos is a product manager for Sybase iAnywhere and is responsible for the direction and life cycle planning of Sybase iAnywhere products. With more than seven years of experience, he also plays an active role in customer demonstrations and education to ensure the continued success of SQL Anywhere, the industry-leading database management and data movement technology built for frontline environments. José holds a Bachelor of Mathematics in Computer Science from the University of Waterloo in Ontario, Canada.
- IBM Puts Systems Chief on Leave of Absence
- Amazon Web Services Database in the Cloud
- SpringSource Moving to Spring 3.0
- Virtualization Expo Call for Papers Deadline December 15
- Move Over BI, Here Comes PI - Performance Intelligence
- Qt DevDays 2009 - Munich
- Using Ext JS, Servlets, JSON, MySQL and Tomcat on Fedora
- Developing APIs for the Cloud
- Canonical Offers Free Cloudware
- New-Generation Virtualization Technologies with Ultra Low-Cost Endpoints
- The Planet Executive to Speak at Cloud Computing Conference
- Trusting the Cloud
- Oracle-Sun: IBM Reportedly Behind Delay
- The Case for Single-Purpose Services
- IBM Puts Systems Chief on Leave of Absence
- Cloud BI & Amazon VPC
- Cloud-Oriented Switch Start-up Valued at $230M
- The Curious Case of Build Release Management eBook
- Amazon Web Services Database in the Cloud
- Tips for Efficient PaaS Application Design
- Reporting Solutions Using Crystal Reports for Eclipse
- SpringSource Moving to Spring 3.0
- Virtualization Expo Call for Papers Deadline December 15
- Un-Clouding Federal Security Compliance
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- Creating Web Applications with the Eclipse Web Tools Project
- Eclipse Special: Remote Debugging Tomcat & JBoss Apps with Eclipse
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- How to Bring Eclipse 3.1, J2SE 5.0, and Tomcat 5.0 Together
- SYS-CON Webcast: Eclipse IDE for Students, Useful Eclipse Tips & Tricks
- Eclipse: The Story of Web Tools Platform 0.7
- "Eclipse 3.0 is a Great Leap Forward," Says JDJ's Dudney
- Developing an Eclipse BIRT Report Item Extension
- The Top 250 Players in the Cloud Computing Ecosystem


























