loopback-example-app with mssql

349 views
Skip to first unread message

Srinivas Hasti

unread,
Mar 12, 2015, 7:05:30 PM3/12/15
to loopb...@googlegroups.com
I am trying to get loopback-example-app  working with mssql. I was able to import the data using import.js. Data all looks good in the database. When i tried to access GET Car from explorer, i get


RequestError: Conversion failed when converting from a character string to uniqueidentifier.
    at Connection.<anonymous> (c:\code\nodejs\test\loopback-example-app\node_modules\loopback-connector-mssql\node_modules\mssql\lib\tedious.js:649:17)
    at Connection.emit (events.js:107:17)
    at Parser.<anonymous> (c:\code\nodejs\test\loopback-example-app\node_modules\loopback-connector-mssql\node_modules\mssql\node_modules\tedious\lib\connectionjs:441:15)
    at Parser.emit (events.js:107:17)
    at Parser.nextToken (c:\code\nodejs\test\loopback-example-app\node_modules\loopback-connector-mssql\node_modules\mssql\node_modules\tedious\lib\token\token-stream-parser.js:91:18)

Any pointers to debug the issue are helpful.

Thanks

Mark Pareja

unread,
Apr 24, 2015, 4:51:53 PM4/24/15
to loopb...@googlegroups.com
Hitting the same error any luck figuring it out?

Raymond Feng

unread,
Apr 24, 2015, 4:57:07 PM4/24/15
to loopb...@googlegroups.com
I believe that one of the primary keys is defined as ‘UNIQUEIDENTIFR’ but the app passes in a string. You can turn on debugging as follows on Windows:

set DEBUG=loopback:connector:mssql
node .

This way, you should be able to see the offending model/method/SQL.

Thanks,

---
Raymond Feng
Co-Founder and Architect @ StrongLoop, Inc.

StrongLoop makes it easy to develop APIs in Node, plus get DevOps capabilities like monitoring, debugging and clustering.

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oleksandr Sochka

unread,
Jan 29, 2016, 12:38:52 PM1/29/16
to LoopbackJS
Did you manage to resolve this issue?

Oleksandr Sochka

unread,
Jan 29, 2016, 12:41:38 PM1/29/16
to LoopbackJS
Srinivas, or maybe you had some success?
Reply all
Reply to author
Forward
0 new messages