0% found this document useful (0 votes)
76 views

Citect and mySQL PDF

The document discusses a user's issue communicating between Citect SCADA software and a mySQL database. The user is receiving an error message ("Descriptor type out of range 307") when trying to execute an SQL query using the SQLExec function in Citect. Others in the discussion provide suggestions on potential causes of the error, such as using "*" to select all fields from the database rather than limiting the number of fields, as Citect has limitations. It is also noted that mySQL has a limit of 4096 columns that can be returned.

Uploaded by

Darshan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views

Citect and mySQL PDF

The document discusses a user's issue communicating between Citect SCADA software and a mySQL database. The user is receiving an error message ("Descriptor type out of range 307") when trying to execute an SQL query using the SQLExec function in Citect. Others in the discussion provide suggestions on potential causes of the error, such as using "*" to select all fields from the database rather than limiting the number of fields, as Citect has limitations. It is also noted that mySQL has a limit of 4096 columns that can be returned.

Uploaded by

Darshan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CitectandmySQL

CitectcommunicatingwithmySQLdatabase
ByAlexandervanDeurzenon13February,200712:48am
Hello,
IwouldliketoknowifsomebodycouldhelpmewiththeproblemIhavetocommunicatewitha
mySQLdatabase.
TheODBCconnectionisnoproblem.WhenItryanSQLExecfunctionthefollowingerror
occured.
(Descriptortypeoutofrange307).Ilookedforthehelpfunctionandcalledourdistributerforthis
problem.Thecouldn'tgivesupportbecauseCitectandmySQLisnottherething.
IalreadyreadsomethingaboutitandthatMatthewRichardsonmanagedthecommunication
betweenCitectandmySQL.
Iwaswonderingifsomebodycouldhelpme?
Withbestregards,
AlexandervanDeurzen
(EXCAMPLECODETHATISUSED)
FUNCTION
ListNames()
INThSQL
STRINGsName
INTStatus
hSQL=SQLConnect("DSN=ZZL_StandaardUID=DitisPWD=kwasieSRVR=why")
IFhSQL<>1THEN
Status=SQLExec(hSQL,"SELECT*FROMtblloog")
IFStatus=0THEN
WHILESQLNext(hSQL)=0DO
sName=SQLGetField(hSQL,"Name")
Message("Data",sName,48)
END
SQLEnd(hSQL)
ELSE
Message("ErrorStatus",SQLErrMsg()+""+IntToStr(Status),48)
END
SQLDisconnect(hSQL)
ELSE
Message("ErrorSQLconnect",SQLErrMsg(),48)
END

END

ByMichaelGriffinon13February,200710:46pm
ThisseemstobeanODBCerrormessage,ratherthanamySQLerrormessage.Microsoftsays
theODBCerrormessagesarelocatedinthe"ODBCProgrammer'sReference"documentation
(whichdoesn'tseemtobeanyplaceobviousontheirwebsite).
YoumighttryaskingthisquestiononthemySQLlistsat:
http://lists.mysql.com/

ByHeineBroerson9November,200710:19pm
Donotuse*foralotoffields.
Citectcanonlyreturnalimitedquantity.
MySQLcanalsohavelimitations.
WeuseMySQLwithCitect.
Noproblemwiththat,butwehaveaddedalotofcodeso1SQLstatementatthetimeis
executed.
SQLExec1
SQLExec2(Multithreading)
SQLNext1>Errorindescriptors
Bestregards,HB

ByNathanBoegeron10November,20072:50pm
MySQL5hasahardlimitof4096columns,buttheactuallimitislessdependingonthe
amountofbytesofthecolumnsdatatype.
http://dev.mysql.com/doc/refman/5.0/en/columncountlimit.html
Sorry,don'tknowanythingaboutthatCitectscripting.

NathanBoeger
http://www.inductiveautomation.com
TotalSCADAFreedom

ByMichaelGriffinon10November,20078:49pm
InreplytoNathanBoeger:4096columnsisnotnormallyaseriouslimitation.Formost
applications,ifyouhaveanywherenearthatmanycolumnsthereissomethingwrongwith
thedatabasedatadesign.

ByNathanBoegeron11November,20076:03pm

Thatiscorrect.Relationaldatabasestypicallymakemoresensetallerratherthanwide.
YouruseofthissiteissubjecttothetermsandconditionssetforthunderLegalNoticesandthe
PrivacyPolicy.Pleasereadthosetermsandconditionscarefully.Subjecttotherightsexpressly
reservedtoothersunderLegalNotices,thecontentofthissiteandthecompilationthereofis
19992015NerdsinControl,LLC.Allrightsreserved.

You might also like