Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


I created a few in the past, but now i MUST use httpS. i really do not know what to fill in in the certificate clause.

From the browse it works, but from a stored proc/function it does not. Below the error.

There was an error reading the results of the SQL statement. The displayed results may be incorrect or incomplete. The secure connection to the remote host failed: A certificate file must be specified SQLCODE=-990, ODBC 3 State="HY000"

Create FUNCTION "USR"."Post_list"( in XMLdata long varchar ) returns long varchar url '' //clientport '443'
type 'HTTP:POST:text/xml' certificate



asked 29 Jun '17, 10:06

Inforit_Marc's gravatar image

accept rate: 0%

You will need to use the CERTIFICATE clause, such as

certificate 'file=C:\MyCertStore\MyRootCA.crt'

and by that specify a file or a string containing the certificate - or with v17 the certificate store.

See that FAQ on what certificate you need.

permanent link

answered 29 Jun '17, 10:40

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

Thanks for your input. I am using sqlanywhere

I am working on the certificate clause, but i'm afraid i get lost there. Should i export a certificate and convert it to crt format, and how do i know which one? Or can i use the other keys, apart from the file, and from which certificate do i need which properties?

We are trying to buy upgrade licence for version 17, but until then i must use 12.

This is from the 12 Docs:

The necessary information is specified in a string of semicolon-separated key/value pairs. You can use the file key to specify the file name of the certificate, or you can use the certificate key to specify the server certificate in a string. You cannot specify a file and certificate key together. The following keys are available: file The file name of the certificate. certificate cert The certificate itself. company co The company specified in the certificate. unit The company unit specified in the certificate. name The common name specified in the certificate.



(30 Jun '17, 14:48) Inforit_Marc
Replies hidden

See the cited FAQ: You will need to provide the root certificate of the web server's certificate. Just visit the site with your browser and check what web server certificate it uses, and store that with the complete certificate chain, then use the whole cert file or just the root certificate.

(30 Jun '17, 16:47) Volker Barth

No I assume I need to export this and save it on the machine running the DB I call my Stored Proc.

Is there a tool / manual for doing this the proper way. I get a parsing error all the time. Guess i miss something...



(01 Jul '17, 11:44) Inforit_Marc
Replies hidden

FWIW, here's a sample which includes how to download a web server certificate from a web site and store it as a .crt-file:

Sending Email From SQL Anywhere 12 Via Google's SMTP Server

While this blog article deals with using a certificate for SMTP, the handling is similar to including that for a HTTPS web client procedure. In a web client procedure, you would here simply add a clause like

...certificate 'file=c:\\temp\\Equifax_Secure_Certificate_Authority.cer'
(03 Jul '17, 06:03) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 29 Jun '17, 10:06

question was seen: 1,619 times

last updated: 03 Jul '17, 06:03