Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

problem with DB mysql

$
0
0
hi guy  i do a  big script  in  a part of  this  script  , i  have created  this
Func _tag_sitlefacebook()
$tag_scritta=GUICtrlRead($input2)
if $tag_scritta = '' Then
MsgBox(4160+48,"info","Inserisci la scritta nel tag ")
Else
MsgBox(4160+48,"info","Premi il tasto destro sulla  foto ")

While 1
if _IsPressed(02) Then
$pos = MouseGetPos()

  $ax=($pos[0]-50)
  $ay=($pos[1]-110)
  $a = GUICtrlCreateGraphic($ax, $ay, 4, 80)
	   GuiCtrlSetState(-1,$GUI_ONTOP)
	GUICtrlSetBkColor(-1, 0xff00)
  $cx=($pos[0]-50)
  $cy=($pos[1]-110)
  $c = GUICtrlCreateGraphic($cx, $cy, 80, 4)
	GuiCtrlSetState(-1,$GUI_ONTOP)
	GUICtrlSetBkColor(-1, 0xff00)
  $dx=($pos[0]+27)
  $dy=($pos[1]-110)
  $d = GUICtrlCreateGraphic($dx, $dy, 4, 80)
	   GuiCtrlSetState(-1,$GUI_ONTOP)
	GUICtrlSetBkColor(-1, 0xff00)
  $bx=($pos[0]-50)
  $by= ($pos[1]-30)
  $b = GUICtrlCreateGraphic($bx,$by, 81, 20)
	GuiCtrlSetState(-1,$GUI_ONTOP)
	GUICtrlSetBkColor(-1, 0xff00)
  $label2X=($pos[0]-50)
  $label2Y=($pos[1]-30)
  $Label2 = GUICtrlCreateLabel($tag_scritta,$label2X ,$label2Y , 81, 20)
  GUICtrlSetBkColor(-1, 0x00FF00)

exitloop
EndIf
WEnd
  Dim $TableName = "tagps"
  Dim $ColumnNames[2]
  Dim $NewGuest[2]
  $ColumnNames[0] = "Tag_Bx"
  $ColumnNames[1] = ""
MsgBox(0,'',$bx)
  $NewGuest[0] = $bx
  $NewGuest[1] = ""
  $SQLInstance = _MySQLConnect($UserName, $Password, $Database, $MySQLServerName)
  _AddRecord($SQLInstance, $TableName, $ColumnNames, $NewGuest)
  _MySQLEnd($SQLInstance)
EndIf

   EndFunc


if use $bx . script crashed
if use 'try this'

the  script  go  correctly
this is mistake:
>Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\stefano\Documents\programmazione\gestionale\GEST - ottimizzato.au3"    
C:\Users\stefano\Documents\programmazione\gestionale\MySQL.au3 (132) : ==> The requested action with this object has failed.:
$oconnectionobj.execute ($query)
$oconnectionobj.execute ($query)^ ERROR
->17:04:55 AutoIT3.exe ended.rc:1

my  table  in mysql  is   this

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `tagps`
-- ----------------------------
DROP TABLE IF EXISTS `tagps`;
CREATE TABLE `tagps` (
  `Tag_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Tag_Ax` varchar(300) DEFAULT NULL,
  `Tag_Ay` varchar(300) DEFAULT NULL,
  `Tag_Bx` varchar(300) DEFAULT NULL,
  `Tag_By` varchar(300) DEFAULT NULL,
  `Tag_Cx` varchar(300) DEFAULT NULL,
  `Tag_Cy` varchar(300) DEFAULT NULL,
  `Tag_Dx` varchar(300) DEFAULT NULL,
  `Tag_Dy` varchar(300) DEFAULT NULL,
  `Tag_label2X` varchar(300) DEFAULT NULL,
  `Tag_label2Y` varchar(300) DEFAULT NULL,
  `Tag_Descrizione` varchar(300) DEFAULT NULL,
  `Tag_quantita` varchar(300) DEFAULT NULL,
  `Tag_codice` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`Tag_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=403 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tagps
-- ----------------------------
INSERT INTO `tagps` VALUES ('1', null, null, null, null, null, null, null, null, null, null, null, null, null);

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>