Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when trying to connect #6

Closed
therecluse26 opened this issue Oct 21, 2018 · 3 comments
Closed

Panic when trying to connect #6

therecluse26 opened this issue Oct 21, 2018 · 3 comments
Assignees
Labels

Comments

@therecluse26
Copy link

therecluse26 commented Oct 21, 2018

Hi, I'm receiving this error when I try to call NewAdapter using correct (url encoded) credentials.

panic: mssql: Incorrect syntax near 'casbin'.

I don't think this is an issue with my connection string, but what do you think? This is how I'm calling it.

a := gormadapter.NewAdapter("mssql", "sqlserver://"+username+":"+pass+"@remote_url:1433?database=dbname")
@hsluoyz
Copy link
Member

hsluoyz commented Oct 21, 2018

We didn't test against SQL server in the development. So the connect string parsing is probably buggy for SQL server. What SQL server version are you using? Because I need to install one and see why it doesn't work.

You can wait for me to debug this. Maybe it will take 1-2 days. You can also help debug it by yourself if you want. Debug into this adapter, see how the connect string doesn't work for SQL server.

@therecluse26
Copy link
Author

therecluse26 commented Oct 22, 2018

@hsluoyz I'm trying to connect to an Azure SQL DB, and that's what it will be running on in production, any help would be greatly appreciated.

I'll also see what I can come up with in debugging, thanks man!

@therecluse26
Copy link
Author

Okay, I was able to bypass the error by passing true as a third parameter into the NewAdapter() method for dbSpecified. Then I just manually created the table in my database and it seems to work fine now!

@hsluoyz hsluoyz self-assigned this Oct 22, 2018
@hsluoyz hsluoyz added the bug label Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants