Citect and mySQL PDF
Citect and mySQL PDF
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.