ManselD Posted March 26, 2019 Share Posted March 26, 2019 Ok, so I've got a basic project set up in order for you guys to replicate the issue. Essentially, using System.Data.SqlClient doesn't work only when in a Script. It works fine when in a console application etc... In this solution, there's three projects. One is DatabaseTest, which is the script which the server loads. Another is ConsoleTest which just calls the same querying code as DatabaseTest, but doesn't have a reference to GTANetworkAPI. The third is where the querying code is, which is called Shared. Here's the error I am getting: Just create a MSSQL DB on your machine called "Test", then you'll be able to test if it connects in the Console app. Optionally you can add some tables to the DB with this SQL: CREATE TABLE TEST ( REEEEEE INT ) CREATE TABLE TEST2 ( REEEEEE INT ) CREATE TABLE TEST3 ( REEEEEE INT ) Here's the output from the working ConsoleApp with no GTANetworkAPI reference: And the non-working code inside the script: Once it calls Connection.GetTables and reaches the first statement (Which instantiates the SqlConnection class) it dies and claims the platform isn't supported... Considering I'm using the same machine when executing the projects... It gives me a hunch that something is acting weird with GTANetworkAPI. Any ideas? I've uploaded the project files here: https://mega.nz/#!dIkkDS4b!43paRU2tMegxU6ZaVTUSFZLZ3tp3YKm2E42CG-rogIk Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now