2

I am trying to insert my data to mssql server with odbc using PHP but it doesnt insert any rows.

Here My PHP Codes:

$q="INSERT INTO dosyadegerlendirme (
                                    YatisNo,
                                    Degerlendirici,
                                    Kodlayici,
                                    HataSeviye,
                                    AnaHataKategoriId,
                                    AnaHataKategori,
                                    AltKategoriId,
                                    AltKategori,
                                    DosyaDonemi,
                                    DegerlendirmeTarihi ) 
    VALUES    (
               '{$_POST['yatisno']}',
               '{$_SESSION['login_user']}',
               '{$_POST['kodcu']}',
               '{$hataSeviye}',
               '{$_POST['AnaHataKategorisi']}', 
               '{$anaKategoriAciklama}',
               '{$_POST['AltHataKategorisi']}',
               '{$altKategoriAciklama}',
               '{$_POST['donem']}',
               '{$_POST['dtarih']}' )";



$result=odbc_exec($baglanti, $q); 

I am getting this error:

[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.

How can I achive this?

Thanks

coder3
  • 115
  • 9

1 Answers1

0

Can not say much cause you did not give anything about your server where your app works but this can help.

Community
  • 1
  • 1
mim.
  • 669
  • 9
  • 18