Questions tagged [sqlanywhere]
SAP SQL Anywhere is an RDBMS, produced by SAP. Before version 10, use [sybase-asa].
574
questions
0
votes
1
answer
38
views
Java and SQL Anywhere: No suitable driver found for jdbc:default:connection
I wrote a simple Java (1.8) function which is stored and run on a SQL Anywhere database (17). It does some file processing with some SQL blob INSERT/UPDATE calls.
Since it runs on a database, the ...
0
votes
0
answers
12
views
AseConnection error : Cannot convert '08/10/09' to a timestamp
Data.AseClient for connecting to Sybase database from .Net Web API project.
This is my part of the code calling the SP
AseCommand dbCommand = new AseCommand("exec My_SP ...
0
votes
0
answers
27
views
Run SQL-Anywhere 17 inside a docker-container
I tried to run a node.js project inside a Docker-Container and start a sql-anywhere database.
At the startup I get the following error:
Error: Code: -2004 Msg: Can't initialize DBCAPI
Environment:
...
0
votes
0
answers
19
views
Suppress header/column name (SqlAnywhere)
Run a SELECT from the command prompt:
dbisql -nogui -c "UID=user; PWD=pwd;DSN=dsn" select net_sls_ttl,svc_ttl,void_ttl,tax_coll_ttl from dly_sys_ttl where business_date=TODAY()
Output is:
...
0
votes
1
answer
22
views
Sybase: enabling LIMIT
Which one of these three statements is the best one to enable the keyword LIMIT?
SET OPTION RESERVED_KEYWORDS = 'LIMIT';
SET OPTION PUBLIC reserved_keywords = 'LIMIT';
SET OPTION PUBLIC....
0
votes
1
answer
33
views
Could not load dbcapi library in Rails 6.0.6 production mode
I'm working on a web project, which connects to a SQLAnywhere version 17 database. I'm using Ruby version 2.6.2 and Rails 6.0.6 to run the app.
I've already set the SQLAnywhere environment variables, ...
0
votes
0
answers
50
views
SQL Anywhere 17 & PHP 8.x.y on Linux
I want to install PHP SQL Anywhere 17 module for PHP 8.1 version.
I am using the PHP 8.0.0 module provided in the SAP documentation (https://wiki.scn.sap.com/wiki/display/SQLANY/The+SAP+SQL+Anywhere+...
0
votes
0
answers
28
views
Not able to Merge and Insert from stored procedure on SQL ANYWHERE
ALTER PROCEDURE "DBA"."Inventory_CreateOrUpdateStock"(
IN @ItemCode CHAR(10),
IN @Name VARCHAR(200),
IN @Description VARCHAR(100),
IN @Size VARCHAR(60),
IN @Colour VARCHAR(60),
IN @...
0
votes
0
answers
52
views
Django connection with Sybase SQL Anywhere 17 with pyodbc on Digital Ocean App Platform
I need help with connecting to the Sybase SQL Anywhere database via the pyodbc library.
When I am running a local development server or local python desktop script connection is established easily and ...
1
vote
2
answers
71
views
PHP SQL Anywhere connection errors
I am having a very frustrating problem connecting to SQL Anywhere 17 from PHP 7.4.5. The OS is CentOS 7.9. I have installed the SQL Anywhere client v17. There is no Apache or web-server, PHP is in ...
0
votes
1
answer
195
views
dotnet 6 - Sap.Data.SQLAnywhere.SAException (0x80004005): Cannot find the language resource file (dblgen17.dll)
I use SQL Anywhere and only have to include the necessary 64-bit DLL files of the same type in my project directory. These are always copied to the bin folder during the build. When I debugging and ...
0
votes
0
answers
79
views
Replication from Sybase SQL Anywhere to MSSQL
I am trying to replicate or synchronize data between Sybase SQL Anywhere database with MSSQL db.
I tried Proxy Table in SQLA and insert query is working fine. But for actual replication we need update ...
0
votes
0
answers
43
views
Unable to determine the provider name for provider factory 'iAnywhere.Data.SQLAnywhere.SAFactory'. Make sure that the ADO.NET provider is installed
I am trying to run the C# MVC application connected with SQL Anywhere. I am getting following error:
Btw, I am using SQL Anywhere 16 on windows machine.
-1
votes
1
answer
104
views
Bi-Directional Data Sync
I have a query on bi-directional data sync.
The scenario is, that we have ERP software running on a local network
which is developed in PowerBuilder and the database is SQL Anywhere 16, Also, we have ...
0
votes
0
answers
36
views
SAP Anywhere 16 xp_startsmtp with STARTTLS
I already send emails from my SQL Anywhere Version 16.
But I have to change to a smtp server which requires STARTTLS.
Opening the connection
SELECT xp_startsmtp('user@mydomain.de', 'smtp.netcologne.de'...
0
votes
0
answers
9
views
.DB file worked on PC1 but not PC2
I have a smaple.db file.
I created ODBC for this db in PC1 and be able to login, but with the same credential, it says 'the connection failed' in PC2.
0
votes
1
answer
45
views
Cannot cast result from Sub-Select to numeric
I am selecting a list of IDs as a sub-query in a condition but it says it cannot convert '123,456' to numeric. The problem occurs in the last line. DB is Sybase-SQL-Anywhere.
SELECT
ISNULL(SUM(a....
0
votes
1
answer
12
views
Aggregate results in SQLAnywhere 16 (For XML replacement)
I'm using Ultralite 16.0 and trying to aggregate multiple rows into one.
I have a film table and a genre table, that have a many-to-many relationship through the film_genre table.
I want a result like ...
0
votes
0
answers
28
views
Transfer Data from a Adaptive SQL Anywhere version 7 32 bit database to an MYSQL DB
I need some help! I'm trying transer data every morning from the main database to a second one. The data are stored in a Adaptive SQL Anywhere version 7 DB 32 bit and I want to store the datas of two ...
0
votes
0
answers
114
views
SQLAnywhere CURSOR TEMPORARY TABLE
Im trying to process rows using CURSOR and write values for each row to a temporary table. This works if I use the FOR loop e. g. FOR myLoop AS myCursor CURSOR FOR ... but I want to use the cursor as ...
0
votes
0
answers
154
views
Connectivity issues to SAP SQL Anywhere database as a secondary database with Django
I can connect to a SAP SQL Anywhere database with FreeTDS and pyodbc as follows:
# hello_sybase.py
import pyodbc
try:
con = pyodbc.connect('Driver={FreeTDS};'
'Server=10.60.1.6,2638;'...
0
votes
0
answers
52
views
Simple query running slow, using the wrong index
The query:
SELECT first DebtCase.SourceID
FROM DCS.DebtCase
WHERE DebtCase.SourceInterfaceType = 'ABC'
AND DebtCase.DebtNr = 'XYZ'
order by ID desc
My problem that this simple query runs for ...
0
votes
1
answer
210
views
[FreeTDS][SQL Server]SQL Anywhere Error -265: Procedure 'SERVERPROPERTY' not found
I'm trying to connect to a SAP SQL Anywhere database with pyodbc and the FreeTDS ODBC driver.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path....
0
votes
1
answer
105
views
Syntax error near 'unlock' - 'alter role warehouse_user unlock'
Trying to run - 'alter role warehouse_user unlock' on Sybase IQ
Failed due to
SQL Anywhere Error -131: Syntax error near 'unlock' on line 1
someone knows why?
6
votes
2
answers
4k
views
[Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.9.so.1.1'
When I run
$ python manage.py inspectdb --database=mssql_database
I have the following error
django.db.utils.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/...
0
votes
2
answers
47
views
Why the indexes not speeding up the query?
I have the following query:
SELECT TOP 1000 *
FROM MyTable
WHERE Status = 'N' AND Type is not null
ORDER BY mytable.id
MyTable has 130 million rows.
I also created these indexes:
CREATE INDEX &...
0
votes
0
answers
92
views
Sybase Python SQL Anywhere 17 SQL Central
I don't know which module for python can I use to connect to DB. And use SQL commands INSERT INTO , SELECT to manipulation DB TABLE. Pls help me to find module and example. I have UserId , Password , ...
0
votes
1
answer
143
views
odbcinst symbol lookup error SQLManageDataSources
I've just installed unixODBC on Pop-OS (Ubuntu 20 base). there's no odbcinst.ini file, just odbc.ini and when I run odbcinst -j I just get the following
odbcinst: symbol lookup error: odbcinst: ...
0
votes
0
answers
33
views
restoring a mbz5g4 file from sql anywhere
I have an mbz5g4 file that contains a database dump of micros POS DB and i would like to visualize the data(tables) in this file I have SQL anywhere, is there a way to attach the file to my local DB ...
0
votes
1
answer
51
views
How to insert multiple rows into an SQL table when the values for one (or more) of the columns need to be derived from another table?
I cannot for the life of me find an answer to this extremely simple question.
What is the correct way to insert multiple rows into an SQL table when the values for one (or more) of the columns need to ...
0
votes
2
answers
40
views
Is it possible to only bring in values into a column if there is no data in another column?
I work for a transportation company. We have two types of drivers, our own company drivers and external Carriers. Carriers are a business to business transaction and what we pay them for each move is ...
0
votes
1
answer
108
views
Django - how to correctly install library without pip in venv to work after deployment
According to this guide I successfully connected to Sybase database in my django project in virtual environment.
After deployment in Apache the web writes this error message
Environment:
Request ...
0
votes
1
answer
155
views
Sybase looping not working - interactive sql
im trying the do a simple cursor that will give me data , executing the cursor in a 5 seconds interval .
but it only shows 1 row and stop... im working on sybase interactive sql , this is the query:
...
0
votes
1
answer
270
views
How can I get libdbcapi_r.so, libdbcapi_r.dylib needed for sqlany-django?
I installed and configured sqlany-django, but have error Could not load dbcapi: Tried: dbcapi.dll, libdbcapi_r.so, libdbcapi_r.dylib.
I installed sqlany-django with pip install sqlany-django. ...
0
votes
0
answers
126
views
uninitialized constant Arel::Visitors::VISITORS
I'm trying to connect to a Sybase DB with SqlAnywhere from my rails app (the sybase is a secondary db), but when I declare my connection, I receive the follow exception
NameError (uninitialized ...
0
votes
0
answers
20
views
Timezone Conversion Function
I have a requirement.
I will provide input as date and time.
My Function must return the date and time of that particular location.
But, my db and computer will be at same date and time only
I need in ...
0
votes
1
answer
1k
views
How to convert a UTC timestamp to a named timezone in SAP SQL Anywhere?
I'm using SAP SQL Anywhere 17 and have a timestamp (without time zone) which I know is UTC, and I know that my client's browser reports a time zone of "Europe/Berlin".
Is there an easy way ...
0
votes
1
answer
319
views
How to connect to Sybase SQL Anywhere 5 database running on 9 server using native ADO.NET?
SQL Anywhere used to come bundled with Sybase Powerbuilder, and now is the property of SAP. From version 5 to version 12 something changed, and when trying to open an ADO.NET connection, it tries to ...
-1
votes
1
answer
43
views
Dual results in Query
I have a query where I am getting double the results in my line items. Here is a copy of what I have. Do I have to do the joins differently? Here is also a screen shot of what the results look like. ...
-1
votes
1
answer
66
views
How to fetch data from same column using different criteria?
Hi I have table like this in SQL anywhere database
CUSTID-------DDAT.----------AMOUNT
1. 01-01-2021. 1000
1. 02-02-2021. 2000
1. 03-02-2021. 3000
1. ...
0
votes
1
answer
177
views
I need to do a query from 2 tables using count function
The query contains 4 columns: the full name of the doctor, the number of male patients, the number of female patients, and the total number of patients seen by that doctor.
My problem is that I dont ...
0
votes
1
answer
189
views
SQL Unique ID for union all - Sybase
Is it possible to generate a unique ID for the auxiliary table? I am retrieving data from several tables, but I do not know how to create a new ID for the results:
I would like to have an additional ...
1
vote
1
answer
108
views
update value in first row of partition. sqlanywhere17
given a Table T
id
FKey
col_value
1
1
NULL
2
1
NULL
3
2
NULL
4
3
NULL
5
4
NULL
6
4
NULL
7
4
NULL
8
5
NULL
9
5
NULL
i want to Update each row with the highest id with value 1 for each given ...
1
vote
0
answers
725
views
Exception in thread "main" java.lang.UnsatisfiedLinkError: no dbjdbc17 in java.library.path
I am trying to connect a java program to a database SQL Anywhere 17 using JDBC connection SQL Anywhere 17 installed in Windows machine. I have built a JAR to run the connection. The JAR is working in ...
0
votes
1
answer
454
views
SQL Anywhere query to dig schema structure
I'm trying to make a SQL query which does the following things:
Select all tables in a schema
Select all columns from the table
Select the columns type (char, int, tinyint, etc)
Select the columns ...
0
votes
1
answer
305
views
SAP Sybase WHILE inside of FOR LOOP
I'm trying to get this to work, but it keeps coming up with
Could not execute statement.
Syntax error near 'BEGIN' on line 14
SQLCODE=-131, ODBC 3 State="42000"
Line 1, column 1
You can ...
0
votes
1
answer
73
views
Dynamic SQL Date Header
I would like to ask a little help on using dynamic sql date header,
i have data that i count transaction group by date then by hours.
date range would be entered start date and end date.
my data is ...
0
votes
1
answer
54
views
run select on multiple subgroups
i have a table with say
Name, ForeignKey, datestart, dateend
I want to select the most recent item that has not ended yet for each Foreignkey.
for a date 2020.07.02
So if the table is:
name |FK| ...
1
vote
2
answers
732
views
iAnywhere.Data.SQLAnywhere.SAException Connection error: Connection was dropped (may not be a SQL Anywhere server)
While trying to connect to SQLAnywhere (Sybase) database (C# code) from Azure ServiceFabric:
await using var connection = new SAConnection(connectionString);
await connection.OpenAsync();
receive ...
0
votes
2
answers
613
views
Installing php extension for SQL Anywhere on server with CentOS, Plesk, php-fpm
we got a new WebServer with CentOS, Plesk and php-fpm.
Now we don't get the php extension running.
What we did:
installed latest SQL Anywhere 17 (ebf29577)
copied php-7.3.0_sqlanywhere_r.so to /opt/...