How can I connect to a Database with ISQL?

thomas_ee
Kilo Contributor

According to the Wiki I should use "Connect" but this does not work. ODBC System DSN is called "ServiceNow". Strange is that due to help, the connect statement does not need a semicolon to finish. Here it is asked for:

ServiceNow ODBC Driver Interactive SQL (ODBC) Version 1.0.9

(c) Copyright 2015 ServiceNow. All rights reserved.

Program Locale:English_United States.1252

ISQL> connect odbc.servicenow*myPassword@ServiceNow

Cont> ;

You are not connected to any database

Cannot execute the SQL statement

Elapsed time 0 ms.

Elapsed time: Prepare 0 ms.   Execute 0 ms.     Fetch results 0 ms.

ISQL>

3 REPLIES 3

Midhun1
Giga Guru

Hi,



Using Interactive SQL With ODBC - ServiceNow Wiki


This may help you..



Thanks,


Midhun


This doesn't help because the instructions provided by the link don't work.


tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Thomas,



What is the results of


SELECT NUMBER, short_description FROM incident;


when you enter it after you have carried out the connect?



You do not need the ; for the connect.


If you enter it by itself, it looks like an empty sql command.



If you still get an error


Does your defined DSN pass this test here:


Testing the ODBC Driver - ServiceNow Wiki



and



If you interactively log into the instance with odbc.servicenow can you view say incidents?



Best Regards



Tony