Android Question A question about RDC when insert data into mssql

liangchaozu

Member
Licensed User
Longtime User
I met a question when i access mssql database server with RDC.I can't insert data into mssql,but can delete,update,select.
i test select_animal,delete_animal and update_animal,the three commands are ok.Just insert_animal command is failed.
com.microsoft.sqlserver.jdbc.SQLServerException: com.microsoft.sqlserver.jdbc.SQLServerException:
Incorrect syntax near the keyword 'SET'.

who can help me?


 

liangchaozu

Member
Licensed User
Longtime User
The error message is: Incorrect syntax near the keyword 'SET'. If you have changed the properties file then you need to restart the RDC server (or better set Debug=true)

Thanks.
I restart the RDC server when i change properties file every time.
There is no 'set' keyword in the insert_animal sql statement,so I doubt if it's a bug of RDC server.
 
Upvote 0

liangchaozu

Member
Licensed User
Longtime User
Have you added SET in one of your attempts?
No.
I create a new statement:
sql.insertinto_animal=INSERT into Pexist.dbo.animals(name,id) VALUES(?,?)
then run,got a new error msg:missing statement insertinto_animal, because I forgot to change client code:cmd.Name = "insert_animal".
After i changed client code,that error is still show.
 
Upvote 0

liangchaozu

Member
Licensed User
Longtime User
After i changed client code,that error is still show. i mean that error:
com.microsoft.sqlserver.jdbc.SQLServerException: com.microsoft.sqlserver.jdbc.SQLServerException:
Incorrect syntax near the keyword 'SET'.
 
Upvote 0

Sytek

Active Member
Licensed User
Longtime User




Hi There, I got this error while trying this one over RDC conector

PHP:
DriverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
JdbcUrl=jdbc:microsoft:sqlserver://localhost:1443;databaseName=almacen
User=sa
Password=xxxxxxxx
ServerPort=17178
Would you please Help me?
Best Regards
 
Last edited:
Upvote 0

liangchaozu

Member
Licensed User
Longtime User

try to delete microsoft:
JdbcUrl=jdbc:sqlserver://localhost:1443;databaseName=almacen

and make sure DriverClass path is correct. Mine is com.microsoft.sqlserver.jdbc.SQLServerDriver.

 
Upvote 0

Sytek

Active Member
Licensed User
Longtime User
"liangchaozu, post: 188128, member: 34728"]try to delete microsoft:
JdbcUrl=jdbc:sqlserver://localhost:1443;databaseName=almacen

and make sure DriverClass path is correct. Mine is com.microsoft.sqlserver.jdbc.SQLServerDriver.

@Erel : Thank's But I'm not sending info, I'm just testing the RDC Connection.
@liangchaozu : Thank's, That did the trick, and some user configuration issues at sql server 2008, forgot to include the mixed option access.
Best Regards!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…