![alt text][1]
mssql Integrated Security login failed
![alt text][2]
[1]: /storage/temp/191715-1643105968812.jpg
[2]: /storage/temp/191716-1643106829708.jpg
↧
mssql Integrated Security login failed
↧
Cannot connect to a MS SQL Server database using Windows authentication, through the unity
Cannot connect to a MS SQL Server database using Windows authentication, through the unity.
but SqlServer authentication can use.
this is my code
SqlConnectionStringBuilder scsb = new SqlConnectionStringBuilder();
scsb.DataSource = ".\\SQLExpress";//,49680";
scsb.InitialCatalog = DataBaseName;
scsb.IntegratedSecurity = true;
SqlConnection sqlconn = new SqlConnection(scsb.ToString());
sqlconn.Open();
↧
↧
mssql supported by Unity?
I want to create databases to login into my game
If anyone has done this before, can I get a way? Thank you
↧
How to deal with exception: encoding 1256 data could not be found. Make sure you have correct international codeset assembly installed and enabled
encoding 1256 data could not be found make sure you have correct international codeset assembly installed and enabled
↧
how to send form php data to database?
Hello people im learning how to send data php to sql database.
I mounted a localhost web (xampp)
and I have a php file what depending of from what section of the web im sending data (garantias or reclamos) it send different data to the sql database.
this is the php code:
error)){
$msg = print_r($wpdb_apache_gestion->error->errors['db_select_fail'][0] );
return $msg;
}
$current_date = new DateTime();
$current_date->setTimezone(new DateTimeZone('America/Buenos_Aires'));
$current_date = $current_date->format( 'Y-m-d H:i' );
if($_POST['_wpcf7_container_post'] == '88359'){
$wpdb_apache_gestion->insert('garantias',
[
'consecionario' => $data['concesionario'],
'email' => $data['your-email'],
'telefono' => $data['telefono'],
'cliente' => $data['cliente'],
'nombre' => $data['nombre'],
'apellido' => $data['apellido'],
'cuit' => $data['cuit'],
'modelo' => $data['modelo'],
'n_serie' => $data['num-serie'],
'fecha_marcha' => $data['puesta-en-marcha'],
'hec_trab' => $data['hectareas'],
'hor_trab' => $data['horas'],
'region_trabajo' => $data['region'],
'marca_modelo' => $data['marca-modelo'],
'potencia' => $data['potencia'],
'caudal_hidraulico' => $data['caudal'],
'presion_hidraulica' => $data['presion'],
'sist_hidr_centro' => $data['sistema'],
'falla1' => $data['descripcion-falla'],
'created' => $current_date,
'modified' => $current_date
]
);
$id_inserted = $wpdb_apache_gestion->insert_id;
if($id_inserted){
echo '';
}
} else if($_POST['_wpcf7_container_post'] == '88393'){
$wpdb_apache_gestion->insert('reclamos',
[
'nombre'=> $data['nombre'],
'apellido'=> $data['apellido'],
'email'=> $data['your-email'],
'modelo'=> $data['modelo'],
'telefono'=> $data['telefono'],
'mensaje'=> $data['sugerencia-reclamo'],
'created'=> $current_date,
'modified'=> $current_date
]
);
}
$last_query = $wpdb_apache_gestion->insert_id;
if(!empty($last_query)){
echo '';
}else{
echo '';
}
?>
from the web works ok.
from unity, I dont get errors but the database dont get populated.
this is my code for post data to "garantias" table from unity:
IEnumerator Upload()
{
List formData = new List();
formData.Add(new MultipartFormDataSection("consecionario", "concesionario damian"));
formData.Add(new MultipartFormDataSection("email", "damian_p@gmail.com"));
formData.Add(new MultipartFormDataSection("telefono", "123123456"));
formData.Add(new MultipartFormDataSection("cliente", "damiancito"));
formData.Add(new MultipartFormDataSection("nombre", "nombre: damiancito"));
formData.Add(new MultipartFormDataSection("apellido", "notnot"));
formData.Add(new MultipartFormDataSection("cuit", "201232323"));
formData.Add(new MultipartFormDataSection("modelo", "APACHE some")); //modelo sembradora
formData.Add(new MultipartFormDataSection("n_serie", "500")); //n chasis sembradora
formData.Add(new MultipartFormDataSection("fecha_marcha", "2022-10-30")); //2022-08-08
formData.Add(new MultipartFormDataSection("hec_trab", "150"));
formData.Add(new MultipartFormDataSection("hor_trab", "50"));
formData.Add(new MultipartFormDataSection("region_trabajo", "hidden tree"));
//tractor section
formData.Add(new MultipartFormDataSection("marca_modelo", "Case")); //tractor
formData.Add(new MultipartFormDataSection("potencia", "150"));
formData.Add(new MultipartFormDataSection("caudal_hidraulico", "150"));
formData.Add(new MultipartFormDataSection("presion_hidraulica", "180"));
formData.Add(new MultipartFormDataSection("sist_hidr_centro", "Centro cerrado"));
//general section
formData.Add(new MultipartFormDataSection("falla1", "123123456"));
formData.Add(new MultipartFormDataSection("created", "2022-10-30"));
formData.Add(new MultipartFormDataSection("modified", "2022-10-30"));
//this are from mysql
//formData.Add(new MultipartFormDataSection("created", "123123456")); //2022-10-28 15:45:00
//formData.Add(new MultipartFormDataSection("modified", "123123456")); //2022-10-28 15:45:00
UnityWebRequest www = UnityWebRequest.Post("https://localhost/apachedam/wp-content/themes/salient/consulta-en-garantia.php", formData);
yield return www.SendWebRequest();
if (www.result != UnityWebRequest.Result.Success)
{
Debug.Log(www.error);
}
else
{
Debug.Log("Form upload complete!");
}
}
I think the problem is what from Unity Im not specifying to what table I want to send the data (garantias/reclamos)
im right?.
Any guidance is appreciated.
↧
↧
Converting from WWW to UnityWebRequest
I've been trying to make a register function for a database and have run into an issue with using WWW where I'm told its obsolete and to use UnityWebRequest, however when I switch WWW with UnityWebRequest other issues arise, does anyone know what I could do to fix this?
Here is the code:
IEnumerator Register()
{
WWWForm form = new WWWForm();
form.AddField("name", regUsernameField.text);
form.AddField("password", regPasswordField.text);
WWW www = new WWW("http://localhost/sqlconnect/register.php", form);
yield return www;
if (www.text == "0")
{
Debug.Log("User created successfully");
UnityEngine.SceneManagement.SceneManager.LoadScene("StartMenu");
}
else
{
Debug.Log("User creation failed. Error #" + www.text);
}
}
↧