sqlanywhere

java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to org.apache.tomcat.jdbc.pool.DataSource

元气小坏坏 提交于 2019-12-05 03:18:38
问题 I'm running Tomcat 7.0.22 and I wrote a simple servlet that connects to a SQL Anywhere 12.0 database. When I run the servlet I get java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to org.apache.tomcat.jdbc.pool.DataSource. My ./META-INF/content.xml file looks like the following: <Context> <Resource name="jdbc/FUDB" auth="Container" type="javax.sql.DataSource" username="dba" password="sql" driverClassName="sybase.jdbc.sqlanywhere.IDriver" factory="org

java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to org.apache.tomcat.jdbc.pool.DataSource

只谈情不闲聊 提交于 2019-12-03 16:13:46
I'm running Tomcat 7.0.22 and I wrote a simple servlet that connects to a SQL Anywhere 12.0 database. When I run the servlet I get java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to org.apache.tomcat.jdbc.pool.DataSource. My ./META-INF/content.xml file looks like the following: <Context> <Resource name="jdbc/FUDB" auth="Container" type="javax.sql.DataSource" username="dba" password="sql" driverClassName="sybase.jdbc.sqlanywhere.IDriver" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" url="jdbc:sqlanywhere:uid=dba;pwd=sql;eng=BTH476331A

How to get at the database schema of a hidden DB?

微笑、不失礼 提交于 2019-12-03 13:33:54
My customer is a dental practice that has bought a piece of practice management software. This software was installed on their local server, including a patient database, a schedule and all manner of medical records. Now they want me to write some utilities for them that aren't provided with their package, and for this I need the ability to query this database. I tried calling tech support of the software manufacturers ( Patterson/EagleSoft ), and it's difficult finding anyone who understands the technology enough to answer my questions. As far as I can tell, there's no API for their software,

adding CHECK to impose constraints on more than one table

泄露秘密 提交于 2019-12-02 16:59:51
问题 I want to modify the following DDL to add CHECK constraints so that the manager of a store works at the same store and a store supplies all the products if its type is 'local'. Can anyone help? CREATE TABLE employee( employee_number CHAR(5) NOT NULL, name VARCHAR(30), store_code CHAR(5) PRIMARY KEY(employee_number), FOREIGN KEY(store_code) REFERENCES store ) CREATE TABLE store( store_code CHAR(5) NOT NULL, type VARCHAR(15), employee_number CHAR(5), PRIMARY KEY(store_code), FOREIGN KEY

Entity Data Model wizard disappears SQL Anywhere 17

大憨熊 提交于 2019-12-02 09:54:29
问题 I am trying to make a new model using Entity Framework 6 and SQL Anywhere 17. I followed exactly these steps. http://dcx.sap.com/index.html#sqla170/en/html/37fb9e8558e94547b66156b9298be16f.html But when I go through Entity Data Model wizard, it disappears after the following screen. 回答1: I got same Issue and able to resolve by following these step. Open server explorer tab- Delete all existing data connections- Rebuild your project- After this Entity Data Model wizard will not disappears. 来源:

correlation name not found on SQL Anywhere

╄→尐↘猪︶ㄣ 提交于 2019-12-02 09:08:53
I have two tables called Employees and Salarygroup . PersonalID is the primary key of Employees and SalaryID is the primary key of Salarygroup. Inside the Employees table there is one more row called StartDat , which has date data type and tracks down the date when the employee started working at the company. Moreover, AmountInEuros is the salary that an employee gets every month and it has a numeric data type I need to make a function, which count the total amount of money, that the employee has recieved so far from the company, but when I input the PersonalID I get an error saying

adding CHECK to impose constraints on more than one table

夙愿已清 提交于 2019-12-02 07:50:45
I want to modify the following DDL to add CHECK constraints so that the manager of a store works at the same store and a store supplies all the products if its type is 'local'. Can anyone help? CREATE TABLE employee( employee_number CHAR(5) NOT NULL, name VARCHAR(30), store_code CHAR(5) PRIMARY KEY(employee_number), FOREIGN KEY(store_code) REFERENCES store ) CREATE TABLE store( store_code CHAR(5) NOT NULL, type VARCHAR(15), employee_number CHAR(5), PRIMARY KEY(store_code), FOREIGN KEY(employee_number) REFERENCES employee ) CREATE TABLE product( product_code CHAR(5) NOT NULL, description

Entity Data Model wizard disappears SQL Anywhere 17

我是研究僧i 提交于 2019-12-02 06:44:21
I am trying to make a new model using Entity Framework 6 and SQL Anywhere 17. I followed exactly these steps. http://dcx.sap.com/index.html#sqla170/en/html/37fb9e8558e94547b66156b9298be16f.html But when I go through Entity Data Model wizard, it disappears after the following screen. I got same Issue and able to resolve by following these step. Open server explorer tab- Delete all existing data connections- Rebuild your project- After this Entity Data Model wizard will not disappears. 来源: https://stackoverflow.com/questions/37178496/entity-data-model-wizard-disappears-sql-anywhere-17

Python list of ints in prepared sql statement

邮差的信 提交于 2019-12-01 19:42:35
My question is somewhat the same as Python list of String to SQL IN parameter but I have a list of integers. The python code I use is: ids = [1000032, 1000048] sql = 'SELECT CompNo, CompName, CompType FROM Component WHERE DeptID IN (?)' cursor.execute(sql, [','.join(ids)]) And the Sybase database engine responds with: pyodbc.Error: ('07006', "[07006] [Sybase][ODBC Driver][SQL Anywhere]Cannot convert '1000032','1000048' to a numeric (-157) (SQLExecDirectW)") What is the correct way to do this? IMO a more readable way to build a dynamic query string with placeholders using str.format ids =

How to unlock table in sybase?

橙三吉。 提交于 2019-12-01 12:17:53
问题 im trying to change some types on my table in sybase, but when i change it, the output is this one. User 'DBA' has the row in 'table' locked How to unlock this? 回答1: I would: determine the connection_id using sa_locks (documentation here) issue the drop connection *connection_id* statement to the connection that is causing the lock to the table. Use it with care! 来源: https://stackoverflow.com/questions/21413676/how-to-unlock-table-in-sybase