messages
listlengths
1
1
topic
stringlengths
2
60
[ { "date": "2007-06-19", "forum": "FiveWin for Harbour/xHarbour", "text": "You can't use AbsolutePosition property across different recordset. The right solution is using an Id field (that you should have anyway).\n\nEMG", "time": "12:59", "topic": "ADO Absoluteposition", "username": "Enrico Maria Giordano" } ]
ADO Absoluteposition
[ { "date": "2006-11-23", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola a todos.\nHace unas semanas he empezado a trabajar con ADO, tengo una duda (bueno tengo mas de una). \nEstoy visualizando un recordset con un txbrowse, dicho recordset por su naturaleza no me permite ejecutar AddNew.\n\nCual seria la manera mas eficiente y comoda para realizar un alta.\n1.- Ejecutar un insert con el metodo Execute del objeto connection.\n2.- Lo mismo que antes pero con el objeto command\n3.-Crear otro recordset con solo los campos de la tabla en cuestion y me permita hacer AddNew. Esta segunda parece mas comoda, pero que source le pongo, si realmente no me interesa me recupere ningun registro¿?. O puedo poner el cursor en el lado del cliente y asi no descarga registros ?¿ o ...?¿\n4.- ...\n\nPlease opiniones de los expertos, gracias anticipadas.", "time": "12:43", "topic": "ADO AddNew", "username": "Biel EA6DD" } ]
ADO AddNew
[ { "date": "2006-11-23", "forum": "FiveWin para Harbour/xHarbour", "text": "HOla\n\nMira:\n\nInserir registro:\n\n[code:2600aazp]\n oRs:AddNew()\n oRs:Fields( \"id\" ):Value := \"00001\" \n oRs:Fields( \"nombre\" ):Value := \"JOSE CARLOS DA ROCHA\"\n oRs:Fields( \"apelido\" ):Value := \"ROCHINHA\"\n oRs:Fields( \"pais\" ):Value := \"BRASIL\"\n oRs:Update() // Actualiza o recordset\n[/code:2600aazp]\n\nAlterar registro:\n\n[code:2600aazp]\n oRs:Fields( \"id\" ):Value := \"00001\" \n oRs:Fields( \"nombre\" ):Value := \"JOSE CARLOS DA ROCHA\"\n oRs:Fields( \"apelido\" ):Value := \"ROCHINHA\"\n oRs:Fields( \"pais\" ):Value := \"BRASIL\"\n oRs:Update() // Actualiza o recordset\n[/code:2600aazp]\n\nBorrar registro:\n\n[code:2600aazp]\n oRs:Delete()\n oRs:ReQuery() // opcional\n[/code:2600aazp]\n\nOk?", "time": "21:20", "topic": "ADO AddNew", "username": "Rochinha" } ]
ADO AddNew
[ { "date": "2006-11-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Gracias Rochinha, pero eso no es exactamente lo que estaba preguntando. Yo ya conozco los metodos para altas bajas y modificaciones. El problema es que el browse esta basado sobre un recordset (oRS) no editable. Y la pregunta, es cual seria el metodo mas rapido para dar el alta. Otro recordset que permita addnew, inser con execute, ...", "time": "09:23", "topic": "ADO AddNew", "username": "Biel EA6DD" } ]
ADO AddNew
[ { "date": "2006-11-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Amigo\n\nLo recordset esta basado en que tipo de BD?\n\nYo trabajo en modo local, cliente.\n\nRevisa se la abertura es ReadOnly\n\n[code:1elnc654]\nLOCAL oConn := TOLEAUTO():New(\"adodb.connection\") \nPRIVATE oRecordset := TOLEAUTO():New(\"adodb.recordset\") \n\n oConn:Open(\"Provider= MicroSoft.Jet.OLEDB.4.0;Data Source=.\\arquivo.mdb;\") \n\n oRecordSet:LockType := adLockOptimistic // adLockReadOnly\n oRecordSet:CursorType := adOpenKeyset \n oRecordSet:ActiveConnection(oConn) \n oRecordSet:Source := \"Select * from clientes\" // tu query aqui \n oRecordSet:Open() \n oRecordSet:MoveFirst() \n\n aDatos := {} \n\n DO WHILE ! oRecordSet:eof() \n aReng := {} \n FOR x := 1 TO oRecordSet:Fields:Count() \n AADD(aReng,oRecordSet:Field(x-1):Value \n NEXT \n AADD(aDatos,aReng) \n oRecordSet:MoveNext \n ENDDO \n\n oRecordSet:Close() \n oConn:Close()\n[/code:1elnc654]\n\nSaludos", "time": "15:06", "topic": "ADO AddNew", "username": "Rochinha" } ]
ADO AddNew
[ { "date": "2006-11-24", "forum": "FiveWin para Harbour/xHarbour", "text": "El recordset ataca una bases de datos DB2, y el source es [code:3rhsfa3d]\ncSql&#58;= \"SELECT EmpCod,Anyo,NumPed,Fecha,Hora,Usr,NetName,Servir,CliCod,Obs1,Obs2,\"+;\n\"Servido,Presu,Kilos,Ava3Tx,Ava4Tx,Ava6Tx,Ava7Tx,Ava8Tx,Ava9Tx,Avbatx,AvbCtx,AvbDtx\"+;\n\" FROM &#40;SELECT PedCab&#46;EmpCod AS TotEmp, PedCab&#46;Anyo as TotAny, PedCab&#46;NumPed as TotNum,\"+;\n\" SUM&#40;UDS*PESO&#41; AS KILOS FROM PEDCAB LEFT JOIN PEDDET ON PEDCAB&#46;EMPCOD= PEDDET&#46;EMPCOD AND\"+;\n\" PEDCAB&#46;ANYO=PEDDET&#46;ANYO AND PEDCAB&#46;NUMPED=PEDDET&#46;NUMPED GROUP BY\"+;\n\" PEDCAB&#46;EMPCOD, PEDCAB&#46;ANYO, PEDCAB&#46;NUMPED&#41; AS TOTAL, \" +;\n\" PedCab LEFT JOIN PiCliep ON EmpCod=Avaccd AND CliCod=Ava4cd\"+;\n\" WHERE PedCab&#46;EmpCod=Total&#46;TotEmp AND PedCab&#46;Anyo=Total&#46;TotAny AND PedCab&#46;NumPed=Total&#46;TotNum\"\n\n[/code:3rhsfa3d]\nEste recordset no me perimite hacer AddNew(supongo que por el join , o por alguna otra cosa, no por el tipo de cursor, ni tipo de blouqeo), entonces debo utilizar otro recordset sobre la tabla base PedCab, o capturar los datos en variables y volcarlos con excute \"insert ... \", y la pregunta cual es el metodo mejor.\n\nPD. Los nombre de atributos son rarillos porque la tabla clientes fue creada con una herammienta Case que maneja diccionario de datos, y les pone estos nombres tan chulos y a la vez descriptivos <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> (Ava3Tx,Ava4Tx,Ava6Tx...)", "time": "16:00", "topic": "ADO AddNew", "username": "Biel EA6DD" } ]
ADO AddNew
[ { "date": "2006-11-25", "forum": "FiveWin para Harbour/xHarbour", "text": "Si\n\nEntonces debes usar INSERT pois con ele tu iras referenciar la tabla alvo mas directamente.", "time": "07:02", "topic": "ADO AddNew", "username": "Rochinha" } ]
ADO AddNew
[ { "date": "2010-03-23", "forum": "FiveWin para Harbour/xHarbour", "text": "COmo se pregunta si un coloumna es Nula Null\nTengo entendido que en xharbour equivale a Nill\n\nvara := iif(oDatos:Fields(\"nombre_estilo\"):Value = Nill,\" \",oDatos:Fields(\"nombre_estilo\"):Value)\n\nEsto eata bien\n\n\nTengo FWH 8.03 y xharbour 21/August/2008 1.1.0 Rev 6195", "time": "22:27", "topic": "ADO Como se Pregunta si una Columna es Nula (Solicionado)", "username": "ruben Dario" } ]
ADO Como se Pregunta si una Columna es Nula (Solicionado)
[ { "date": "2010-03-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola Ruben...\n\nTienes 3 formas de preguntar si la columna es Nula.\n\n1. Antes de cargar el recordset usando una consulta sql: (Con Mysql)\n select ifnull(colfecha,now()) as NuevaCol FROM Tabla where otracol IS NULL\n Si la colfecha no es nula me devuleve colfecha, de lo contrario me da la fecha actual, y haga esto con todos los registros cuya otracol es nula.\n\n2 Por ejemplo si quieres hacer un filtro desde el propio recordset con las columnas cuya fecha sea nula haríamos:\n oRs:Filter:=\"colfecha=NULL\"\n\n3. Desde Harbour ya es conocido para todos que se puede preguntar si un valor devuelto es nulo así:\n if(ors:Fields('colfecha'):Value)=nil\n\nCulquiera de estas puedes usarlo dependiendo del escenario donde te encuentres.\nEspero te sirva de algo.\n\nUn saludo\nMarcelo Jingo", "time": "01:06", "topic": "ADO Como se Pregunta si una Columna es Nula (Solicionado)", "username": "sjingo" } ]
ADO Como se Pregunta si una Columna es Nula (Solicionado)
[ { "date": "2010-03-24", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"sjingo\":3vhri68v]Hola Ruben...\n\nTienes 3 formas de preguntar si la columna es Nula.\n\n1. Antes de cargar el recordset usando una consulta sql: (Con Mysql)\n select ifnull(colfecha,now()) as NuevaCol FROM Tabla where otracol IS NULL\n Si la colfecha no es nula me devuleve colfecha, de lo contrario me da la fecha actual, y haga esto con todos los registros cuya otracol es nula.\n\n2 Por ejemplo si quieres hacer un filtro desde el propio recordset con las columnas cuya fecha sea nula haríamos:\n oRs:Filter:=\"colfecha=NULL\"\n\n3. Desde Harbour ya es conocido para todos que se puede preguntar si un valor devuelto es nulo así:\n if(ors:Fields('colfecha'):Value)=nil\n\n\nGracias , Esto es lo que necesitaba.\n\n\nCulquiera de estas puedes usarlo dependiendo del escenario donde te encuentres.\nEspero te sirva de algo.\n\nUn saludo\nMarcelo Jingo[/quote:3vhri68v]", "time": "14:07", "topic": "ADO Como se Pregunta si una Columna es Nula (Solicionado)", "username": "ruben Dario" } ]
ADO Como se Pregunta si una Columna es Nula (Solicionado)
[ { "date": "2010-03-24", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"sjingo\":3h7f92iu]Hola Ruben...\n\nTienes 3 formas de preguntar si la columna es Nula.\n\n1. Antes de cargar el recordset usando una consulta sql: (Con Mysql)\n select ifnull(colfecha,now()) as NuevaCol FROM Tabla where otracol IS NULL\n Si la colfecha no es nula me devuleve colfecha, de lo contrario me da la fecha actual, y haga esto con todos los registros cuya otracol es nula.\n\n2 Por ejemplo si quieres hacer un filtro desde el propio recordset con las columnas cuya fecha sea nula haríamos:\n oRs:Filter:=\"colfecha=NULL\"\n\n3. Desde Harbour ya es conocido para todos que se puede preguntar si un valor devuelto es nulo así:\n if(ors:Fields('colfecha'):Value)=nil\n\nCulquiera de estas puedes usarlo dependiendo del escenario donde te encuentres.\nEspero te sirva de algo.\n\nUn saludo\nMarcelo Jingo[/quote:3h7f92iu]\n\n\nOye te pregun como coloco una imagen .JPG no en podido colocarla se selecciona el icono y aparece lo que esta a continuacion, pero como cargo la imagen\n\n", "time": "17:47", "topic": "ADO Como se Pregunta si una Columna es Nula (Solicionado)", "username": "ruben Dario" } ]
ADO Como se Pregunta si una Columna es Nula (Solicionado)
[ { "date": "2010-03-25", "forum": "FiveWin para Harbour/xHarbour", "text": "No entiendo a que te refieres.\n\nSi lo que quieres es subir una imagen a tu mensaje mira el siguiente enlace:\n[url:1fyf2kc5]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=17413&p=90548&hilit=subir+imagen#p90548[/url:1fyf2kc5]\n\nUn Saludo\n\nMarcelo Jingo", "time": "01:12", "topic": "ADO Como se Pregunta si una Columna es Nula (Solicionado)", "username": "sjingo" } ]
ADO Como se Pregunta si una Columna es Nula (Solicionado)
[ { "date": "2007-12-19", "forum": "FiveWin for Harbour/xHarbour", "text": "To All\n\nI am trying to connect to an Oracle 10g database using the following code which fails every time .. any assistance would be appreciated.\n\nLooking on MSDN there is some confusion as to \"SOURCE\" being the server name .. in this example the EFIS is that actual name of the database that resides on the server name EQCAIX3 ..\n\nRick Lipkin\n\nxPROVIDER := \"MSDAORA\"\nxSOURCE := \"EFIS\"\nxUSERID := \"SUNTRACK\"\nxPASSWORD := \"goefis10\"\n\n\noRs := TOleAuto():New( \"ADODB.Recordset\" )\noRs:CursorType := 1 // opendkeyset\noRs:CursorLocation := 3 // local cache\noRs:LockType := 3 // lockoportunistic\n\ncSQL := \"SELECT * FROM EFIS_UST_RELEASES\"\nTRY\n oRS:Open(cSQL,'Provider='+xPROVIDER+';Data Source='+xSOURCE+';User Id='+xUSERID+';Password='+xPASSWORD )\n* oRs:Open(cSQL, \"Provider=madaora;Data Source=efis;Persist Security Info=False;User ID=suntrack;Password=goefis10\" )\nCATCH oErr\n MsgInfo( \"Error in Opening EFIS_UST_RELEASES table\" )\n CLOSE DATABASES\n QUIT\nEND TRY", "time": "21:13", "topic": "ADO Connection to Oracle 10g", "username": "Rick Lipkin" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-19", "forum": "FiveWin for Harbour/xHarbour", "text": "I don't know it this can be of any help but try:\n\n[code:3pqhjgaj]cSQL &#58;= \"SELECT * FROM &#91;EFIS_UST_RELEASES&#93;\"[/code:3pqhjgaj]\n\nEMG", "time": "22:31", "topic": "ADO Connection to Oracle 10g", "username": "Enrico Maria Giordano" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-19", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico\n\nSorry .. that did not work .. I think it has something to do with the 'source' parameter .. i am missing something from my side on the identification .. server name perhaps, sciema prefix .. something like that.\n\nRick", "time": "23:07", "topic": "ADO Connection to Oracle 10g", "username": "Rick Lipkin" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-19", "forum": "FiveWin for Harbour/xHarbour", "text": "For Source we should use the TNS Name of the Server/Database. It is the name used in TNS Confuration of the Oracle Client on the PC client. It is not the physical servername or the database name given by the DBA on the server.\n\nIf you open connection object separately, ( i advise not mix with opening recordset) and examine the connection object's error object, you narrow down the problem and know where exactly the error is.\n\nI suggest something like this\n[code:5ie2md8c]\ncConnStr &#58;= 'Provider=MSDAORA&#46;1;Data Source=<TNSnameofServer>;User ID= &#46;&#46;&#46;&#46; ;Password- &#46;&#46;'\noCon &#58;= TOLEAuto&#40;&#41;&#58;New&#40;'ADODB&#46;Connection'&#41;\noCon&#58;ConnectionString &#58;= cConnStr\nTRY\n oCon&#58;Open&#40;&#41;\nCATCH\n ShowAdoError&#40;oCon&#41;\n Return &#46;f&#46;\nEND\n\n// now open any number of recordsets using the above conn object\noRs\t&#58;= TOLEAuto&#40;&#41;&#58;New&#40;'ADODB&#46;RecordSet'&#41;\nTRY\n oRs&#58;Open&#40; <sql>, oCon, <other params > &#41;\nCATCH\n ShowAdoError&#40;oCon&#41;\nEND\n//-------------\nSTATIC FUNCTION ShowAdoError\n\nLOCAL nAdoErrors &#58;= 0\nLOCAL oAdoErr\n\n nAdoErrors &#58;= oCon&#58;Errors&#58;Count&#40;&#41;\n IF nAdoErrors > 0\n oAdoErr &#58;= oCon&#58;Errors&#40;nAdoErrors-1&#41;\n msginfo&#40; oAdoErr&#58;Description + CRLF + oAdoErr&#58;Source &#41;\n ELSE\n msginfo&#40; 'Not Oracle Error' &#41;\n ENDIF\n\nRETURN nil\n[/code:5ie2md8c]\nOnce we successfully open the connection object, we can use the same connection object to open hundreds of recordsets or use execute commands. Opening RecSet with connection string each time will open new connection each time with two disadvantages (1) Server will have too many connections open and 32 bit windows server will reach its limit soon, denying service to next users(2) isolating the error becomes difficult.", "time": "23:43", "topic": "ADO Connection to Oracle 10g", "username": "nageswaragunupudi" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-19", "forum": "FiveWin for Harbour/xHarbour", "text": "Schema prefix is to be used with table names as <schema>.<table>. It is always a safe and good programming practice to use schema prefix for all tables in oracle", "time": "23:48", "topic": "ADO Connection to Oracle 10g", "username": "nageswaragunupudi" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-20", "forum": "FiveWin for Harbour/xHarbour", "text": "nageswaragunupudi\n\nWOW ... thanks for the great answer .. I will try your code in the morning. I was using the DNS name of the server for the source .. I do have a tnsnames.ora file .. I think the tns name is 'efis.world' .. The schema is 'suntrack' .. so my guess will be to use :\n\nxPROVIDER := \"MSDAORA\" \nxSOURCE := \"EFIS.world\" \nxUSERID := \"me\" \nxPASSWORD := \"mypassword\" \n\n\noRs := TOleAuto():New( \"ADODB.Recordset\" ) \noRs:CursorType := 1 // opendkeyset \noRs:CursorLocation := 3 // local cache \noRs:LockType := 3 // lockoportunistic \n\ncSQL := \"SELECT * FROM Suntrack.EFIS_UST_RELEASES\" \n\nTRY \noRS:Open(cSQL,'Provider='+xPROVIDER+';Data Source='+xSOURCE+';User Id='+xUSERID+';Password='+xPASSWORD ) \n* oRs:Open(cSQL, \"Provider=madaora;Data Source=efis;Persist Security Info=False;User ID=suntrack;Password=goefis10\" ) \nCATCH oErr \nMsgInfo( \"Error in Opening EFIS_UST_RELEASES table\" ) \nCLOSE DATABASES \nQUIT \nEND TRY", "time": "01:30", "topic": "ADO Connection to Oracle 10g", "username": "Rick Lipkin" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-20", "forum": "FiveWin for Harbour/xHarbour", "text": "Data Source = 'efis.world'.\n\nFor some reasons i did not like the .world extention. Had some issues with it. All our client installations have tns names without the .world. \n\nPlease try efis.world first as the data source name. you should be able to connect.\n\nI once again recommend opening the connection object only in the beginning of the program. Check the validity of connection, check if it is open ( oCon:State == 1 ) and then proceed with rest of the work. At the end of program, close the connection with oCon:Close.\n\nFor opening recordsets, use oCon object in the place of the connection string each time.\n\nThis apporach has a lot more advantages than I could explain in the earlier post. \n\nWe do see many asp page sources with total connection string while opening recordsets. That is a 3-tier architecture and a different environment of stateless connections and disconnected recordsets.\n\nFor client-server programming ( 2-tier ) what I proposed is the best. You may consider if you like.", "time": "01:44", "topic": "ADO Connection to Oracle 10g", "username": "nageswaragunupudi" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-20", "forum": "FiveWin for Harbour/xHarbour", "text": "nageswaragunupudi \n\nWas curious to try your code .. your error message was much more informative than just 'e_fail' ..\n\nI got this message that \n\n'Oracle client and networking componants not found. These componants are supplied by Oracle Corp and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these componants are installed. Microsoft OLE DB Provider for Oracle'\n\nI was hoping MSDAORA would have everything I need .. I do have the thick client of Oracle 6i on my machine .. but I don't believe this is what I need .. further research on the client is the first order of business in the morning ..\n\nMany Thanks\n\nRick Lipkin\n\nps .. I took your code on the connection and used it .. your 'catch' error was much better .. I did try both 'efis' and 'efis.world' .. got the same result.", "time": "01:51", "topic": "ADO Connection to Oracle 10g", "username": "Rick Lipkin" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-20", "forum": "FiveWin for Harbour/xHarbour", "text": "You have to install oracle 10g client that comes along with oracle server software. After installing, you should configure TNS names. Only then our software runs on your PC.\n\n( note: we need the client software on the user pc for every RDMS. For ADS we put the DLLs in the appn directory. Windows comes with MSSQL client software preloaded. )\n\nNow you need to install Oracle 10g client on every PC in your office that uses your software and configure on every PC the tns names to match what you use in your software. For reasons of safety you shd ensure removal of tools like SQL plus from all those PCs (except yours)", "time": "03:52", "topic": "ADO Connection to Oracle 10g", "username": "nageswaragunupudi" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-20", "forum": "FiveWin for Harbour/xHarbour", "text": "nageswaragunupudi\n\nI gathered as much about the client .. was hoping to avoid any complicated setups .. We currently have a 'very ugly' fat client Oracle forms 6i client .. over 1200 some .fmx forms that get depolyed to over 100 servers <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> .\n\nI saw on the Oracle website the Quick 10 or 11i client download .. would this work ( do you think ) or do I need to just go back to the Oracle 10g disk and install the client files ??\n\nRick Lipkin", "time": "14:11", "topic": "ADO Connection to Oracle 10g", "username": "Rick Lipkin" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-20", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote:1xjawhjc]\nI saw on the Oracle website the Quick 10 or 11i client download .. would this work ( do you think ) or do I need to just go back to the Oracle 10g disk and install the client files ??\n[/quote:1xjawhjc]\n\nI did not try the thin clients. But I had enough information from oracle colleagues not to try. Till you read more ( I shall also now look into this seriously) and do some experiements I do not advise you to go for the so called thin clients now.\n\nPlease do install oracle 10g client by all means from the package provided by the oracle inc. It does not really take too much space, but it works well and you can develop your applications. One big advantage is during developent of complex applications you need not consider any problems from the client.\n\n[quote:1xjawhjc]\nwas hoping to avoid any complicated setups\n[/quote:1xjawhjc]\nIt is not really complicated, though not as simple as others. Well we have to do some extra work to get the real power of Oracle which still has no parallel. ( not talking about DB2)\n[quote:1xjawhjc]\nWe currently have a 'very ugly' fat client Oracle forms 6i client .. over 1200 some .fmx forms that get depolyed to over 100 servers\n[/quote:1xjawhjc]\nIt is high time we get rid of the old style forms development and deployment ( unless you use the new tools to make it webbased). But sure if you develop applications in fwh+xharbour we dont need the forms.\nYou dont have to install oracle developer and forms. Just install the client.", "time": "15:19", "topic": "ADO Connection to Oracle 10g", "username": "nageswaragunupudi" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-20", "forum": "FiveWin for Harbour/xHarbour", "text": "nageswaragunupudi \n\nWe are actually running Oracle version 9.2.0.6 .. not 10g as I origionally thought. I have the Ora9i cd and have installed the client portion of the 3 disk cd .. still getting the version 7.3.3 error \n\nAny thoughts or pointers ??\n\nRIck", "time": "22:25", "topic": "ADO Connection to Oracle 10g", "username": "Rick Lipkin" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Please check the PATH and make sure it points to the location of the new isntallation. For example the path on this pc is \"PATH=C:\\oracle\\product\\10.2.0\\client_1\\bin;\"", "time": "03:05", "topic": "ADO Connection to Oracle 10g", "username": "nageswaragunupudi" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-21", "forum": "FiveWin for Harbour/xHarbour", "text": "nageswaragunupudi \n\nThe very first statement in the path is where I installed ( what I hoped was the client ) Ora9i .. c:\\ora9i\\bin .. Perhaps I installed the wrong thing .. would you be so kind as to find me a link to download the proper client .. I noticed in your code .. you have c:\\oracle\\client .... I do not have any of those paths ..\n\nI would be grateful !!\n\nThanks\nRick Lipkin", "time": "14:29", "topic": "ADO Connection to Oracle 10g", "username": "Rick Lipkin" } ]
ADO Connection to Oracle 10g
[ { "date": "2007-12-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Can you please send me the directory structure of your ora9i directory? you can save it as text file by going to c:\\ora9i ( DOS PROMPT ) and issue command \"DIR /S > ORADIR.TXT\". Please send to my personal email <!-- e --><a href=\"mailto:nageswaragunupudi@gmail.com\">nageswaragunupudi@gmail.com</a><!-- e -->", "time": "15:13", "topic": "ADO Connection to Oracle 10g", "username": "nageswaragunupudi" } ]
ADO Connection to Oracle 10g
[ { "date": "2008-05-22", "forum": "FiveWin for Harbour/xHarbour", "text": "To All\r\n\r\nHow can I convert date() to a datetime field in MS Sql server .. I was given this formula and it does work but does not insert the correct\r\ndate into the date portion of the field ..\r\n\r\nnDateTime := ( DATE() - CTOD(\"\") )+( SECONDS()/ (24*3600)) equals \r\nsomething like 6/19/8620 5:17:14 PM\r\n\r\nAs you can see .. todays date is 05/22/2008 5:17 PM ..\r\n\r\nI have records sorted by date desc and SQL server does not take into account natural order .. when you insert DATE() into a datetime field you get 5/22/2008 12:00 PM .. and if you have two rows with the same date .. I can not descriminate the time since both have the same 'default' time.. I need to be able to insert the date and time into the datetime fields to make the rows sort correctly.\r\n\r\nAny advice or help would be appreciated BIG-TIME !!\r\n\r\nRick Lipkin\r\nSC Dept of Health, USA", "time": "22:47", "topic": "ADO Date time update SQL Server", "username": "Rick Lipkin" } ]
ADO Date time update SQL Server
[ { "date": "2008-05-22", "forum": "FiveWin for Harbour/xHarbour", "text": "Rick,\r\n\r\nesto es un error grave de xharbour , \r\n\r\nADO solamente devuelve la FECHA\r\n\r\ndejando fuera la hora,\r\n\r\neste tema ya se habia mensionado en mensajes anteriores,\r\n\r\npero nadie ha dado una solucion,\r\n\r\nsaludos..", "time": "23:43", "topic": "ADO Date time update SQL Server", "username": "sysctrl2" } ]
ADO Date time update SQL Server
[ { "date": "2008-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote:2uw9lds4]Rick,\n\nthis is a serious error of xharbour,\nADO only returns the DATE\nleaving was the hour,\nthis theme already itself habia mensionado in previous messages,\nbut nobody has given a solucion,\n\nGreetings.. \n[/quote:2uw9lds4]\r\n\r\n\r\nI seem to have run into that 'brick wall' .. will do some more searching ..\r\n\r\nThanks\r\nRick Lipkin", "time": "00:00", "topic": "ADO Date time update SQL Server", "username": "Rick Lipkin" } ]
ADO Date time update SQL Server
[ { "date": "2008-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Rick,\r\n\r\n[code:gkovxcua]\nset date american\nset century on\n&#46;&#46;&#46;\n\noRs&#58;Source &#58;= \"Update <your table> set <your datetime field> = '\"+;\ndtoc&#40;date&#40;&#41;&#41;+\" \"+time&#40;&#41;+\"' where &#46;&#46;&#46;&#46;&#46;&#46;\"\n&#46;&#46;&#46;\noRs&#58;Open&#40;&#41;\n[/code:gkovxcua]\r\n\r\nThis update work for me and i get a proper datetime value in table.\r\nMaby I don't understand your problem. If so - sorry.\r\n\r\nRegards Eugeniusz", "time": "10:12", "topic": "ADO Date time update SQL Server", "username": "Eugeniusz Owsiak" } ]
ADO Date time update SQL Server
[ { "date": "2008-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Eugeniusz Owsiak\r\n\r\n* dtoc(date())+\" \"+time() * .. WOW, that worked !!!!!!!!!!!!! beating my head against the wall here over something so simple.\r\n\r\nGlad you had a better pair of eyes than I did ..\r\n\r\nThanks for the HELP !!\r\n\r\nRick Lipkin", "time": "14:34", "topic": "ADO Date time update SQL Server", "username": "Rick Lipkin" } ]
ADO Date time update SQL Server
[ { "date": "2008-05-29", "forum": "FiveWin for Harbour/xHarbour", "text": "If you are using xHarbour, you can straighaway use datetime.\r\n\r\ndtDate := DateTime()\r\noRs:Field(x):Value := dtDate\r\n\r\nNow xHarbour can handle date and time together, it is no more necesssary for us to handle date and time separately", "time": "14:23", "topic": "ADO Date time update SQL Server", "username": "nageswaragunupudi" } ]
ADO Date time update SQL Server
[ { "date": "2007-06-20", "forum": "FiveWin for Harbour/xHarbour", "text": "To All\n\nHow do I concantonate date()+time() into a datetime field to SQL server with ADO ?? \n\nThe reason to add the time stamp is because SQl server does not respect 'natural order'. When I have multiple entry's on the same date() .. SQL will order them randomly within the same date and not as they were added to the table by date .. however if I add the Time() aspect to the datetime field .. the records sort in order of actual sequence.\n\nRick Lipkin\nSC Dept of Health, USA", "time": "21:09", "topic": "ADO Datetime field", "username": "Rick Lipkin" } ]
ADO Datetime field
[ { "date": "2007-06-22", "forum": "FiveWin for Harbour/xHarbour", "text": "Convert date and seconds into a double value like this and assign the value. Date field in OLE can be assigned a value as date or double\n\n[code:8hhsglu6]\nnDateTime &#58;= &#40; dDate - CTOD&#40;\"\"&#41;&#41; + &#40;nSeconds/&#40;24*3600&#41;&#41;\noRs&#58;Fields&#40;\"datetimefield\"&#41;&#58;Value &#58;= nDateTime\n[/code:8hhsglu6]\n\nThis works for all OLE applns, with win32ole.prg of xHarbour. Thiis is working me for Excel and Oracle. Should work for MSSql also.\n\nRegards", "time": "03:55", "topic": "ADO Datetime field", "username": "nageswaragunupudi" } ]
ADO Datetime field
[ { "date": "2015-03-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Is it possible to open a recordset in exclusive mode so others cannot open it ?", "time": "17:45", "topic": "ADO Exclusive open", "username": "AHF" } ]
ADO Exclusive open
[ { "date": "2015-03-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi AHF,\nI don't think it is possible, because the exclusive locking is against usual database principles, and ADO is just an abstraction layer, so that kind of behavoir is depending on the data engine itself, not ADO.\nMay be if you are using some particular data drivers you can state in the string connection that you won't share any data, but it's up to the driver, not ADO.\nProbably it would be easier to use some \"dirty trick\" like a locking semaphore or sth like that, adapted to the engine.\n\nRegards", "time": "18:31", "topic": "ADO Exclusive open", "username": "Carlos Mora" } ]
ADO Exclusive open
[ { "date": "2015-03-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Carlos,\n\nI remember to read somewere that if you opend recorset and issue : begintrans immediatly after might be the same as USE .. EXCLUSIVE if you get an error USE fails if not the state of table would be protected untill you commit or abort trans.\n\nDo you have any experience on this?", "time": "18:49", "topic": "ADO Exclusive open", "username": "AHF" } ]
ADO Exclusive open
[ { "date": "2015-03-24", "forum": "FiveWin for Harbour/xHarbour", "text": "As regards the first question:\nPlease read more on SELECT ... FOR UPDATE available in Oracle, MySql and some others\nPlease note that these are very rarely used. I strongly advise we need to unlearn DBF habits and re-orient our thinking.\n\nWe can also open recordset with pessimistic locking and if we update a record, it is locked till unlocked.\n\nConcept of TRANSACTIONS is different.\n\nOn quite a few occasions we need to update two or more tables for recording a single transaction. We need to either alter all the tables or none of the tables but can not leave some tables altered and some unaltered.\n\nFor this purpose almost all SQL databases offer a construct like this.\n\nBEGIN TRANSACTION\n update table1\n update table2, ........... etc\nif there is some problem\n ROLLBACK TRANSACTION\nelse\n COMMIT TRANSACTION\n\nThe programmer can decide either to COMMIT or ROLLBACK.\nEven hardware / power failures also perform an automatic ROLLBACK.\n\nADO provides the same facility with\noCn:BeginTrans()\noCn:CommitTrans()\noCn:RollBackTrans()\n\nPlease note TDataRow class automatically implements this transactions feature if we use more than one table and enable oRec:lUseTrans is set to .T.", "time": "19:06", "topic": "ADO Exclusive open", "username": "nageswaragunupudi" } ]
ADO Exclusive open
[ { "date": "2015-03-24", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"nageswaragunupudi\":3atg4ft9]\nPlease read more on SELECT ... FOR UPDATE available in Oracle, MySql and some others\nPlease note that these are very rarely used. I strongly advise we need to unlearn DBF habits and re-orient our thinking.[/quote:3atg4ft9]\n\nI agree completly these are two completly diferent worlds.\nThe question is that I m trying to buid an adordd emulating the dbfrdd to have it working with minor code changes in a huge an old application.\n\n[quote:3atg4ft9]We can also open recordset with pessimistic locking and if we update a record, it is locked till unlocked.[/quote:3atg4ft9]\n\nWont do for me.\n\n[quote:3atg4ft9]\nConcept of TRANSACTIONS is different.\n\nOn quite a few occasions we need to update two or more tables for recording a single transaction. We need to either alter all the tables or none of the tables but can not leave some tables altered and some unaltered.\n[/quote:3atg4ft9]\n\nUnfortunatly this application uses a lot of updates to several tables in a single TS.\n\n[quote:3atg4ft9]\nFor this purpose almost all SQL databases offer a construct like this.\n\nBEGIN TRANSACTION\n update table1\n update table2, ........... etc\nif there is some problem\n ROLLBACK TRANSACTION\nelse\n COMMIT TRANSACTION\n\nThe programmer can decide either to COMMIT or ROLLBACK.\nEven hardware / power failures also perform an automatic ROLLBACK.\n\nADO provides the same facility with\noCn:BeginTrans()\noCn:CommitTrans()\noCn:RollBackTrans()\n[/quote:3atg4ft9]\n\nThis is what I want. But how do I know that the recordsets Im opening are all within same connection ?\n\n[quote:3atg4ft9]\nPlease note TDataRow class automatically implements this transactions feature if we use more than one table and enable oRec:lUseTrans is set to .T.[/quote:3atg4ft9]\n\nI know but it doesnt solve my problem. Can I see the source to understand how recordsets are opened in the same connection?\n\nI take the opportunity to ask if you would help as SQL expert to translate fieldsizes and fielddec from sql o dbf in adordd.", "time": "19:52", "topic": "ADO Exclusive open", "username": "AHF" } ]
ADO Exclusive open
[ { "date": "2015-03-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio,\n\noRs:Fields( n ):DefinedSize \n\nAnyhow Mr. Rao is the real expert on ADO/SQL <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "22:14", "topic": "ADO Exclusive open", "username": "Antonio Linares" } ]
ADO Exclusive open
[ { "date": "2015-03-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio,\n\nThis code is from FWH\\source\\function\\adofunc.prg and it has been developed by Mr. Rao and surely will help you very much:\n\n[code=fw:29dol3f8]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">function</span> FWAdoFieldStruct<span style=\"color: #000000;\">&#40;</span> oRs, n <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// ( oRs, nFld ) where nFld is 1 based</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #B900B9;\">// ( oRs, oField ) or ( oRs, cFldName )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #B900B9;\">// ( oField )</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oField, nType, uval<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> cType := <span style=\"color: #ff0000;\">'C'</span>, nLen := <span style=\"color: #000000;\">10</span>, nDec := <span style=\"color: #000000;\">0</span>, lRW := .t. &nbsp;<span style=\"color: #B900B9;\">// default</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> n == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; oField &nbsp; &nbsp; &nbsp;:= oRs<br />&nbsp; &nbsp; &nbsp; oRs &nbsp; &nbsp; &nbsp; &nbsp; := <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp;elseif ValType<span style=\"color: #000000;\">&#40;</span> n <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'O'</span><br />&nbsp; &nbsp; &nbsp; oField &nbsp; &nbsp; &nbsp;:= n<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> n <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'N'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n--<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">TRY</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oField &nbsp; &nbsp; &nbsp;:= oRs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span> n <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; CATCH<br />&nbsp; &nbsp; &nbsp; END<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oField == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;nType &nbsp; &nbsp; &nbsp; := oField:<span style=\"color: #000000;\">Type</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> nType == adBoolean<br />&nbsp; &nbsp; &nbsp; cType &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'L'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; := <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp;elseif AScan<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> adDate, adDBDate, adDBTime, adDBTimeStamp <span style=\"color: #000000;\">&#125;</span>, nType <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; cType &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'D'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; := <span style=\"color: #000000;\">8</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> oRs != <span style=\"color: #00C800;\">nil</span> .and. ! oRs:<span style=\"color: #000000;\">Eof</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .and. ValType<span style=\"color: #000000;\">&#40;</span> uVal := oField:<span style=\"color: #000000;\">Value</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'T'</span> .and. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW_TIMEPART<span style=\"color: #000000;\">&#40;</span> uVal <span style=\"color: #000000;\">&#41;</span> >= <span style=\"color: #000000;\">1.0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cType &nbsp; &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'T'</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;elseif AScan<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> adTinyInt, adSmallInt, adInteger, adBigInt, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; adUnsignedTinyInt, adUnsignedSmallInt, adUnsignedInt, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; adUnsignedBigInt <span style=\"color: #000000;\">&#125;</span>, nType <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; cType &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'N'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; := oField:<span style=\"color: #000000;\">Precision</span> + <span style=\"color: #000000;\">1</span> &nbsp;<span style=\"color: #B900B9;\">// added 1 for - symbol</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> oField:<span style=\"color: #000000;\">Properties</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ISAUTOINCREMENT\"</span> <span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">Value</span> == .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cType := <span style=\"color: #ff0000;\">'+'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lRW &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;elseif AScan<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> adSingle, adDouble <span style=\"color: #000000;\">&#125;</span>, nType <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; cType &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'N'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; := <span style=\"color: #0000ff;\">Max</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">19</span>, oField:<span style=\"color: #000000;\">Precision</span> + <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; nDec &nbsp; &nbsp; := <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp;elseif nType == adCurrency<br />&nbsp; &nbsp; &nbsp; cType &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'N'</span> &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">// 'Y'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; := <span style=\"color: #000000;\">19</span><br />&nbsp; &nbsp; &nbsp; nDec &nbsp; &nbsp; := <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp;elseif AScan<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> adDecimal, adNumeric, adVarNumeric <span style=\"color: #000000;\">&#125;</span>, nType <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; cType &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'N'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; := <span style=\"color: #0000ff;\">Max</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">19</span>, oField:<span style=\"color: #000000;\">Precision</span> + <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> oField:<span style=\"color: #000000;\">NumericScale</span> > <span style=\"color: #000000;\">0</span> .and. oField:<span style=\"color: #000000;\">NumericScale</span> < nLen<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nDec &nbsp;:= oField:<span style=\"color: #000000;\">NumericScale</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;elseif AScan<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> adBSTR, adChar, adVarChar, adLongVarChar, adWChar, adVarWChar, adLongVarWChar <span style=\"color: #000000;\">&#125;</span>, nType <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; := oField:<span style=\"color: #000000;\">DefinedSize</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> nType != adChar .and. nType != adWChar .and. nLen > nFWAdoMemoSizeThreshold<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cType := <span style=\"color: #ff0000;\">'M'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLen &nbsp;:= <span style=\"color: #000000;\">10</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;elseif AScan<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> adBinary, adVarBinary, adLongVarBinary <span style=\"color: #000000;\">&#125;</span>, nType <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; := oField:<span style=\"color: #000000;\">DefinedSize</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> nType != adBinary .and. nLen > nFWAdoMemoSizeThreshold<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cType := <span style=\"color: #ff0000;\">'m'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLen &nbsp;:= <span style=\"color: #000000;\">10</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;elseif AScan<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> adChapter, adPropVariant <span style=\"color: #000000;\">&#125;</span>, nType <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; cType &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'O'</span><br />&nbsp; &nbsp; &nbsp; lRW &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; lRW &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lAnd<span style=\"color: #000000;\">&#40;</span> oField:<span style=\"color: #000000;\">Attributes</span>, 0x72100 <span style=\"color: #000000;\">&#41;</span> .or. ! lAnd<span style=\"color: #000000;\">&#40;</span> oField:<span style=\"color: #000000;\">Attributes</span>, <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; lRW &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">&#123;</span> oField:<span style=\"color: #0000ff;\">Name</span>, cType, nLen, nDec, nType, lRW <span style=\"color: #000000;\">&#125;</span></div>[/code:29dol3f8]", "time": "22:16", "topic": "ADO Exclusive open", "username": "Antonio Linares" } ]
ADO Exclusive open
[ { "date": "2018-08-16", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello ,\n\nTesting ADO oRs:Field := cExpression\n\nI found some difficulties :\n\noRS.FILTER := \"FIRST='Jon' OR (Married=0 AND LAST LIKE 'D*')\"// Accepted\noRS.FILTER := FIRST='Jon' OR Married=0 AND LAST LIKE 'D*'\" // NOT ACCEPTED\n oRS.FILTER := \"(FIRST='Jon' OR Married=0) AND LAST LIKE 'D*'\" // NOT ACCEPTED\noRS.FILTER := \"LAST LIKE 'D*' AND FIRST='Jon' OR Married=0\" // NOT ACCEPTED\noRS.FILTER := \"LAST LIKE 'D*' AND (FIRST='Jon' OR Married=0)\" // NOT ACCEPTED\n\nWhy is only the first expression accepted ? Espacially why the third or fifth not ?\n\nIt seems that only the first one is accepted , how do we know where to place ( and ) ?\n\nFrank", "time": "10:16", "topic": "ADO FILTER , BOOLEAN EXPRESSION", "username": "Franklin Demont" } ]
ADO FILTER , BOOLEAN EXPRESSION
[ { "date": "2018-08-16", "forum": "FiveWin for Harbour/xHarbour", "text": "I had the same problem\n[url:2a9to7wr]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=35944[/url:2a9to7wr]\n\nHere is the documentation of the filter\n[url:2a9to7wr]https&#58;//docs&#46;microsoft&#46;com/en-us/sql/ado/reference/ado-api/filter-property?view=sql-server-2017[/url:2a9to7wr]", "time": "11:42", "topic": "ADO FILTER , BOOLEAN EXPRESSION", "username": "Marc Vanzegbroeck" } ]
ADO FILTER , BOOLEAN EXPRESSION
[ { "date": "2015-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nWe are almost finishing ADORDD, but there is a problem converting some filters from Clipper sinatx to ADO Filter command:\n\nThe problem is with the vars (oData:Codigo, cName)...:\n\n[code=fw:21u412qf]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br />&nbsp; SET FILTER <span style=\"color: #0000ff;\">TO</span> FIELD->NAME = cName<br />&nbsp; SET FILTER <span style=\"color: #0000ff;\">TO</span> AUXILIAR->RELACION &nbsp;== alltrim<span style=\"color: #000000;\">&#40;</span> &nbsp;STR<span style=\"color: #000000;\">&#40;</span> oData:<span style=\"color: #000000;\">Codigo</span> <span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp;<br />&nbsp; cCondicion := <span style=\"color: #ff0000;\">\"CONTA->CUENTA = \"</span> + chr<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">34</span> <span style=\"color: #000000;\">&#41;</span> + alltrim<span style=\"color: #000000;\">&#40;</span> cValToChar<span style=\"color: #000000;\">&#40;</span> cCuentaoConcepto <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> + chr<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">34</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; cCondicion := <span style=\"color: #ff0000;\">\"CONTA->CONCEPTO = \"</span> + chr<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">34</span> <span style=\"color: #000000;\">&#41;</span> + alltrim<span style=\"color: #000000;\">&#40;</span> cValToChar<span style=\"color: #000000;\">&#40;</span> cCuentaoConcepto <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> + chr<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">34</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp;</div>[/code:21u412qf]\n\n\nThis is the parser to ADO:\n\n[code=fw:21u412qf]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oRecordSet:<span style=\"color: #000000;\">Filter</span> := SqlTranslate<span style=\"color: #000000;\">&#40;</span>aFilterInfo<span style=\"color: #000000;\">&#91;</span> UR_FRI_CEXPR <span style=\"color: #000000;\">&#93;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><span style=\"color: #00C800;\">STATIC</span> <span style=\"color: #00C800;\">FUNCTION</span> SQLTranslate<span style=\"color: #000000;\">&#40;</span> cFilter <span style=\"color: #000000;\">&#41;</span><br />&nbsp; <span style=\"color: #00C800;\">local</span> cWhere<br />&nbsp; <span style=\"color: #00C800;\">local</span> nAt, nLen, cToken, cDate, n<br />&nbsp; <span style=\"color: #00C800;\">local</span> afunctions := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"STR(\"</span>,<span style=\"color: #ff0000;\">\"VAL(\"</span>,<span style=\"color: #ff0000;\">\"CVALTOCHAR(\"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">'SOUNDEX('</span>, <span style=\"color: #ff0000;\">\"ABS(\"</span>,<span style=\"color: #ff0000;\">\"ROUND(\"</span>,<span style=\"color: #ff0000;\">\"LEN(\"</span>,<span style=\"color: #ff0000;\">\"ALLTRIM(\"</span>,<span style=\"color: #ff0000;\">\"LTRIM(\"</span>,<span style=\"color: #ff0000;\">\"RTRIM(\"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"UPPER(\"</span>,<span style=\"color: #ff0000;\">\"LOWER(\"</span>,<span style=\"color: #ff0000;\">\"SUBSTR(\"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"SPACE(\"</span>,<span style=\"color: #ff0000;\">\"DATE(\"</span>,<span style=\"color: #ff0000;\">\"YEAR(\"</span>,<span style=\"color: #ff0000;\">\"MONTH(\"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"DAY(\"</span>,<span style=\"color: #ff0000;\">\"TIME(\"</span>,<span style=\"color: #ff0000;\">\"IF(\"</span><span style=\"color: #000000;\">&#125;</span><br />&nbsp; <span style=\"color: #00C800;\">local</span> areplaces := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\" LIKE \"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span>,<span style=\"color: #ff0000;\">\"\"</span><span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= Upper<span style=\"color: #000000;\">&#40;</span> cFilter <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= StrTran<span style=\"color: #000000;\">&#40;</span> StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #ff0000;\">\"'\"</span>, <span style=\"color: #ff0000;\">\"''\"</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">'\"'</span>, <span style=\"color: #ff0000;\">\"'\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= StrTran<span style=\"color: #000000;\">&#40;</span> StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #ff0000;\">\".AND.\"</span>, <span style=\"color: #ff0000;\">\"AND\"</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\".OR.\"</span>, <span style=\"color: #ff0000;\">\"OR\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= StrTran<span style=\"color: #000000;\">&#40;</span> StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #ff0000;\">\".T.\"</span>, <span style=\"color: #ff0000;\">\"1\"</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\".F.\"</span>, <span style=\"color: #ff0000;\">\"0\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #ff0000;\">\"==\"</span>, <span style=\"color: #ff0000;\">\"=\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #ff0000;\">\"!=\"</span>, <span style=\"color: #ff0000;\">\"<>\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #ff0000;\">\"!\"</span>, <span style=\"color: #ff0000;\">\" NOT \"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>+<span style=\"color: #ff0000;\">\"->\"</span>, <span style=\"color: #ff0000;\">\"\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> <span style=\"color: #00C800;\">At</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"!DELETED()\"</span>, cWhere <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #000000;\">1</span>; cWhere &nbsp; := LTrim<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #000000;\">11</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> <span style=\"color: #00C800;\">At</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"AND\"</span>, cWhere <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #000000;\">1</span>; cWhere := LTrim<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> <span style=\"color: #00C800;\">At</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"OR\"</span>, cWhere <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #000000;\">1</span>; cWhere := LTrim<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>; <span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> &nbsp;<span style=\"color: #00C800;\">At</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"$\"</span>,cWhere<span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; cWhere := InvertArgs<span style=\"color: #000000;\">&#40;</span>cWhere,<span style=\"color: #ff0000;\">\"$\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// Now handle dates its adpated from adofuncs because it was only considering one occurrence</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">do</span> <span style=\"color: #00C800;\">while</span> .t.<br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">for</span> each cToken in <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #ff0000;\">\"STOD(\"</span>, <span style=\"color: #ff0000;\">\"CTOD(\"</span>, <span style=\"color: #ff0000;\">\"HB_STOT(\"</span>, <span style=\"color: #ff0000;\">\"HB_CTOT(\"</span>, <span style=\"color: #ff0000;\">\"STOT(\"</span>, <span style=\"color: #ff0000;\">\"CTOT(\"</span>, <span style=\"color: #ff0000;\">\"{^\"</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nAt &nbsp; &nbsp;:= <span style=\"color: #00C800;\">At</span><span style=\"color: #000000;\">&#40;</span> cToken, cWhere <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> nat > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">next</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> nAt = <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">for</span> each cToken in <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #ff0000;\">\"STOD(\"</span>, <span style=\"color: #ff0000;\">\"CTOD(\"</span>, <span style=\"color: #ff0000;\">\"HB_STOT(\"</span>, <span style=\"color: #ff0000;\">\"HB_CTOT(\"</span>, <span style=\"color: #ff0000;\">\"STOT(\"</span>, <span style=\"color: #ff0000;\">\"CTOT(\"</span>, <span style=\"color: #ff0000;\">\"{^\"</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nAt &nbsp; &nbsp;:= <span style=\"color: #00C800;\">At</span><span style=\"color: #000000;\">&#40;</span> cToken, cWhere <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> nAt > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> <span style=\"color: #0000ff;\">Left</span><span style=\"color: #000000;\">&#40;</span> cToken, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">\"{\"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLen &nbsp;:= <span style=\"color: #00C800;\">At</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"}\"</span>, <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cWhere, nAt <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLen &nbsp;:= <span style=\"color: #00C800;\">At</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\")\"</span>, <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cWhere, nAt <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cDate := <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cWhere, nAt, nLen <span style=\"color: #000000;\">&#41;</span><br />#ifdef __XHARBOUR__<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> <span style=\"color: #0000ff;\">Left</span><span style=\"color: #000000;\">&#40;</span> cDate, <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">\"HB_\"</span>; cDate := <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cDate, <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">&#41;</span>; <span style=\"color: #00C800;\">endif</span><br />#else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> <span style=\"color: #0000ff;\">Left</span><span style=\"color: #000000;\">&#40;</span> cDate, <span style=\"color: #000000;\">5</span> <span style=\"color: #000000;\">&#41;</span> $ <span style=\"color: #ff0000;\">\"STOT(,CTOT(\"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cDate &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">\"HB_\"</span> + cDate<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> <span style=\"color: #0000ff;\">Left</span><span style=\"color: #000000;\">&#40;</span> cDate, <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span> = <span style=\"color: #ff0000;\">\"{^\"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cDate &nbsp; &nbsp;:= LTrim<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cDate, <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cDate &nbsp; &nbsp;:= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">':'</span> $ cDate, <span style=\"color: #ff0000;\">\"HB_STOT('\"</span>, <span style=\"color: #ff0000;\">\"HB_STOD('\"</span> <span style=\"color: #000000;\">&#41;</span> + cDate + <span style=\"color: #ff0000;\">\"')\"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cDate &nbsp; &nbsp;:= CharRem<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"/-:} \"</span>, cDate <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br /><br />#endif<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cDate &nbsp;:= &cDate<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cWhere := Stuff<span style=\"color: #000000;\">&#40;</span> cWhere, nAt, nLen, &nbsp;DateToADO<span style=\"color: #000000;\">&#40;</span> cDate <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">next</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">enddo</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">for</span> n:= <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> len<span style=\"color: #000000;\">&#40;</span>afunctions<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;cWhere := StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, afunctions<span style=\"color: #000000;\">&#91;</span>n<span style=\"color: #000000;\">&#93;</span>, areplaces<span style=\"color: #000000;\">&#91;</span>n<span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">next</span><br /><br />&nbsp; &nbsp;cWhere &nbsp; &nbsp; &nbsp;:= StrTran<span style=\"color: #000000;\">&#40;</span> cWhere, <span style=\"color: #ff0000;\">\")\"</span>, <span style=\"color: #ff0000;\">\"\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br /><span style=\"color: #00C800;\">return</span> cWhere<br /><br /><br />&nbsp;</div>[/code:21u412qf]\n\n\nAny clue please?.\n\nThank you.", "time": "12:00", "topic": "ADO Filtering - Mr. Nages and others", "username": "lucasdebeltran" } ]
ADO Filtering - Mr. Nages and others
[ { "date": "2015-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Translating a filter condition when the condition contains harbour variables seems to be difficult. I could not find a way. So the present FW_Filter2Where() function returns valid condition only if the filter condition contains constants only and not variables.\n\nThe author of SQLRDD did an extremely wonderful job. It may be worth seeing how did he handle this.", "time": "12:51", "topic": "ADO Filtering - Mr. Nages and others", "username": "nageswaragunupudi" } ]
ADO Filtering - Mr. Nages and others
[ { "date": "2015-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Mr. Nages,\n\nThank you.\n\nAre you refering to SQLRDD from xHarbour.com?. I am afraid the source code is not available.\n\nSO far, the only way would be to rewrite all filters to this:\n\n[code=fw:2vh3gg6j]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br />cFiltro := <span style=\"color: #ff0000;\">\"NIF = '\"</span> + ALLTRIM<span style=\"color: #000000;\">&#40;</span> cNif<span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\"'\"</span><br />bFiltro := <span style=\"color: #ff0000;\">\"{|| \"</span> + cFiltro +<span style=\"color: #ff0000;\">\"}\"</span><br /><br />DBSETFILTER<span style=\"color: #000000;\">&#40;</span> &bFiltro, cFiltro <span style=\"color: #000000;\">&#41;</span> <br /><br />&nbsp;</div>[/code:2vh3gg6j]\n\n\nAny other approach?.\n\nThank you.", "time": "12:54", "topic": "ADO Filtering - Mr. Nages and others", "username": "lucasdebeltran" } ]
ADO Filtering - Mr. Nages and others
[ { "date": "2015-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI also posted on the Harbour and xHarbour developers group to get their kind help:\n\n<!-- m --><a class=\"postlink\" href=\"https://groups.google.com/forum/#!topic/comp.lang.xharbour/Dbfq-Zydz0I\">https://groups.google.com/forum/#!topic ... bfq-Zydz0I</a><!-- m -->\n\n<!-- m --><a class=\"postlink\" href=\"https://groups.google.com/forum/#!topic/harbour-devel/Gsz0_vb8hh8\">https://groups.google.com/forum/#!topic ... sz0_vb8hh8</a><!-- m -->", "time": "14:36", "topic": "ADO Filtering - Mr. Nages and others", "username": "lucasdebeltran" } ]
ADO Filtering - Mr. Nages and others
[ { "date": "2008-05-09", "forum": "FiveWin for Harbour/xHarbour", "text": "I use sql and ado to talk to a database on MS Sql Server\r\nI need some info :\r\nI need an instruction to put in a array the name of all the tables (files) located in one database .\r\n\r\nFor a table, i want to know the number of records .\r\n\r\nI also want to know the number of fields, name of fields , type ans size .\r\n\r\nHow to with ado syntax ?\r\n\r\nThanks \r\nPh Jacquet (Belgium)", "time": "08:51", "topic": "ADO MS SQL", "username": "Jack" } ]
ADO MS SQL
[ { "date": "2008-05-09", "forum": "FiveWin for Harbour/xHarbour", "text": "JACK\r\n\r\nTake a look at my CLASS, \"ADOBASE\".\r\nThere you have all you want to do.\r\nThere's an exe with its source code, and the class.\r\n\r\nDownload it from \r\n<!-- m --><a class=\"postlink\" href=\"http://200.72.140.34/privado\">http://200.72.140.34/privado</a><!-- m --> \r\n\r\nThe file is ADOBASE.RAR\r\n\r\nFrom Chile\r\nAdolfo", "time": "13:22", "topic": "ADO MS SQL", "username": "Adolfo" } ]
ADO MS SQL
[ { "date": "2008-05-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Yes I used it, nice <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \r\n\r\nThanks Adolfo\r\n\r\nregards\r\nFafi", "time": "05:41", "topic": "ADO MS SQL", "username": "fafi" } ]
ADO MS SQL
[ { "date": "2011-10-13", "forum": "FiveWin for Harbour/xHarbour", "text": "Ayuda Estimados,\n\nTengo una aplicacion con ADO y MySql todo va bién hasta que 2 usuarios modifican el mismo registro del recordset, y ahi el programa se cae en el usuario que grabó al final.\nGRACIAS de antemano por cualquier ayuda.\n\nestoy definiedo el bloqueo como sale a continuación:\n\n oCmd := TOLEAUTO():New(\"adodb.command\")\n oCmd :ActiveConnection(oCon)\n oRS := TOleAuto():New(\"adodb.recordset\")\n oRS :CursorLocation := adUseClient\n oRS :LockType := adLockOptimistic <------------ TIPO DE BLOQUEO\n oRS :CursorType := adOpenKeyset \n oRs:ActiveConnection(oCon)\n oRs:Source := \"SELECT * FROM clientes ORDER BY NomCuenta \"", "time": "18:34", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "lafug" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-14", "forum": "FiveWin for Harbour/xHarbour", "text": "Update operation by a user fails if another user updated the record after the user read the recordset and before updating. This is concurrency error.\n\nIt is desirable that we should ascertain that the row is not updated by other users before calling oRs:Update() method. Normally oRs:Resync( adAffectCurrent, adResyncUnderlyingValues ) method helps us to know this. But unfortunately not all providers support this method. I very much doubt if Resync(...) is available for ADO MySql, particularly because ODBC is used.\n\nOnly remaining alternative is to use the crude TRY .. CATCH .. END. We may examine the ADO error object to make sure it is the concurrency issue. If the Update fails, ReQuery() the recordset, inform the user about the concurrency issue and offer to re-edit.\n\nNote on:\noRS :CursorType := adOpenKeyset \nWhen we open a recordset on the client side (this is what we should do) there is no use of assigning any values like adOpenKeyset or adOpenDynamic. Whatever we want ADO always opens the recordset with CursorType static only.", "time": "04:32", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "nageswaragunupudi" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-14", "forum": "FiveWin for Harbour/xHarbour", "text": "Lafug and Rao\n\nRao .. you are VERY correct about ReSync() not being universally supported by some Databases .. like Access for example which causes difficulties in networked environments specifically when it comes to workstation updates and visibility.\n\nAs far as concurrency I use a signature field in my tables called \"Updated\" which I increment each time a record has been modified. Before I commit any record .. I fire off a separate recordset back to the master table looking just for the primary key ( row id ) and the \"updated\" field .. if the buffered up record has the same value as the the table .. I commit the record .. if the master table has a greater value than the buffered 'updated' variable .. I assume someone has slipped behind the user and made a change to the same record therefore making the record about to be saved obsolete.\n\nIn many cases ReQuery() is not an option because of how xbrowse saves bookmarks .. and issuing a Requery() and moving back to the same row in xbrowse is not possible.\n\nStruggling with Access and workstation visibility and concurrency myself .. I would much rather use Sql Server ..\n\nRick Lipkin", "time": "13:49", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "Rick Lipkin" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-14", "forum": "FiveWin for Harbour/xHarbour", "text": "Yes Mr Rick. I agree with you. ADO and MsSql are like made for each other.\nBaring a few issues Oracle also works quite well.\n\nThere could be several strategies a programmer can adopt to handle concurrency issues, but all these involve rereading some data from the server just before writing and in all these cases one has to face the possibility of another committing a change in that minute fraction of a second unless pessimistic locking is used and row is locked. With optimistic locking, finally we need to attempt write and handle the failure finally in some way or other. Even if the probability is very low, our code should contain handling of failure.\n\nMay be, TDolphin makes these issues quite simple to handle. I don't have any experience.", "time": "14:29", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "nageswaragunupudi" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-13", "forum": "FiveWin para Harbour/xHarbour", "text": "Ayuda Estimados,\n\nTengo una aplicacion con ADO y MySql todo va bién hasta que 2 usuarios modifican el mismo registro del recordset, y ahi el programa se cae en el usuario que grabó al final.\nGRACIAS de antemano por cualquier ayuda.\n\nestoy definiedo el bloqueo como sale a continuación:\n\n oCmd := TOLEAUTO():New(\"adodb.command\")\n oCmd :ActiveConnection(oCon)\n oRS := TOleAuto():New(\"adodb.recordset\")\n oRS :CursorLocation := adUseClient\n oRS :LockType := adLockOptimistic <------------ TIPO DE BLOQUEO\n oRS :CursorType := adOpenKeyset \noRs:ActiveConnection(oCon)\n oRs:Source := \"SELECT * FROM clientes ORDER BY NomCuenta \"", "time": "18:39", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "lafug" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-13", "forum": "FiveWin para Harbour/xHarbour", "text": "Luis, \n\n¿ Que mensaje te muestra el ado ?, te comento que yo tengo sistemas con ado y mysql con hasta 20 usuarios concurrentes sin problemas.\n\nAtte.,\n\nLautaro Moreira", "time": "19:21", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "Lautaro" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-13", "forum": "FiveWin para Harbour/xHarbour", "text": "Lautaro,\n(mi correo:luisalfonsofuentesg@gmail.com para una asesoria $$ ?)\nEste es el error:\n\nApplication\n===========\n Path and name: C:\\SISTEMAS\\TARGET\\SISGES.Exe (32 bits)\n Size: 2,473,984 bytes\n Time from start: 0 hours 4 mins 52 secs \n Error occurred at: 13/10/2011, 15:37:41\n Error description: Error adodb.recordset/6 DISP_E_UNKNOWNNAME: MOVE\n Args:\n [ 1] = N 0\n\nStack Calls\n===========\n Called from: source\\rtl\\win32ole.prg => TOLEAUTO:MOVE(0)\n Called from: C:\\SISTEMAS\\TARGET\\mancli.prg => SKIPPER(167)\n Called from: C:\\SISTEMAS\\TARGET\\mancli.prg => (b)MANCLI(98)\n Called from: .\\source\\classes\\WBROWSE.PRG => TWBROWSE:SKIP(1733)\n Called from: .\\source\\classes\\WBROWSE.PRG => TWBROWSE:PAINT(757)\n Called from: .\\source\\classes\\WBROWSE.PRG => TWBROWSE:DISPLAY(2277)\n Called from: .\\source\\classes\\CONTROL.PRG => TCONTROL:HANDLEEVENT(1630)\n Called from: .\\source\\classes\\WBROWSE.PRG => TWBROWSE:HANDLEEVENT(1656)\n Called from: .\\source\\classes\\WINDOW.PRG => _FWH(3443)\n Called from: => DIALOGBOXINDIRECT(0)\n Called from: .\\source\\classes\\DIALOG.PRG => TDIALOG:ACTIVATE(277)\n Called from: .\\source\\function\\ERRSYSW.PRG => ERRORDIALOG(394)\n Called from: .\\source\\function\\ERRSYSW.PRG => (b)ERRORSYS(31)\n Called from: source\\rtl\\win32ole.prg => TOLEAUTO:_SORT(0)\n Called from: C:\\SISTEMAS\\TARGET\\mancli.prg => EDITA_MAR(242)\n Called from: C:\\SISTEMAS\\TARGET\\mancli.prg => (b)MANCLI(87)\n Called from: .\\source\\classes\\WINDOW.PRG => TWINDOW:LDBLCLICK(1902)\n Called from: .\\source\\classes\\CONTROL.PRG => TCONTROL:LDBLCLICK(1685)\n Called from: .\\source\\classes\\WBROWSE.PRG => TWBROWSE:LDBLCLICK(1114)\n Called from: => TWINDOW:HANDLEEVENT(0)\n Called from: .\\source\\classes\\CONTROL.PRG => TCONTROL:HANDLEEVENT(1670)\n Called from: .\\source\\classes\\WBROWSE.PRG => TWBROWSE:HANDLEEVENT(1656)\n Called from: .\\source\\classes\\WINDOW.PRG => _FWH(3443)\n Called from: => DIALOGBOX(0)\n Called from: .\\source\\classes\\DIALOG.PRG => TDIALOG:ACTIVATE(277)\n Called from: C:\\SISTEMAS\\TARGET\\mancli.prg => MANCLI(130)\n Called from: C:\\SISTEMAS\\TARGET\\sisges.prg => (b)MAIN(198)\n Called from: .\\source\\classes\\TOOLBAR.PRG => TTOOLBAR:COMMAND(219)\n Called from: .\\source\\classes\\WINDOW.PRG => TWINDOW:COMMAND(1051)\n Called from: => TWINDOW:HANDLEEVENT(0)\n Called from: .\\source\\classes\\WINDOW.PRG => _FWH(3443)\n Called from: => WINRUN(0)\n Called from: .\\source\\classes\\WINDOW.PRG => TWINDOW:ACTIVATE(995)\n Called from: C:\\SISTEMAS\\TARGET\\sisges.prg => MAIN(262)\n Called from: C:\\SISTEMAS\\TARGET\\sisges.prg => INICIO(107)\n\neste es el codigo de la rutina de grabación:\n[code=fw:10tme7jn]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">    <br />        <span style=\"color: #00C800;\">IF</span> lNuevo<br />             oRS:<span style=\"color: #000000;\">AddNew</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />        <span style=\"color: #00C800;\">ENDIF</span><br /><br />        nBookMark:=oRs:<span style=\"color: #000000;\">BookMark</span>                                            <br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"nomcuenta\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>     := cliente<br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"nomcontacto\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>  := contacto<br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"cargo\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>             := cargo<br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"email1email2\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span> := email1_2<br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"telefono\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>        := telefono<br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"direccion\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>       := direccion<br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"pais\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>               := pais<br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"ciudad\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>           := ciudad<br />        oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"asignado_a\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>    := asignadoa<br />        oRS:<span style=\"color: #000000;\">Sort</span>:=<span style=\"color: #ff0000;\">\"nomcuenta\"</span><br /><br />        oRs:<span style=\"color: #000000;\">BookMark</span>:=nBookMark                                            <br />                                                          <br /><br />        oRS:<span style=\"color: #0000ff;\">Update</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /> </div>[/code:10tme7jn]", "time": "19:45", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "lafug" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-13", "forum": "FiveWin para Harbour/xHarbour", "text": "Luis \n\nEl \n[code=fw:9asdtso9]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />&nbsp; &nbsp;... <br />&nbsp; &nbsp;oRs:<span style=\"color: #0000ff;\">Update</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;...<br />&nbsp;</div>[/code:9asdtso9]\n\nmuevelo a antes de \n[code=fw:9asdtso9]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />&nbsp; ...<br />&nbsp; oRs:<span style=\"color: #000000;\">Sort</span>:=<span style=\"color: #ff0000;\">\"nomcuenta\"</span><br />&nbsp; ...<br />&nbsp;</div>[/code:9asdtso9]\n\nNo puedes mover la posicion del recordset antes de hacer el update, ya que el move implica update y luego haces el update nuevamente y ahi salta el error.\n\nSaludos,\n\nLautaro Moreira", "time": "21:27", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "Lautaro" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-13", "forum": "FiveWin para Harbour/xHarbour", "text": "GRacias Lautaro, pero se me cae igual:(\n\n\n[code=fw:25sozvda]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">IF</span> lNuevo<br />     oRS:<span style=\"color: #000000;\">AddNew</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />nBookMark:=oRs:<span style=\"color: #000000;\">BookMark</span>                        <br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"nomcuenta\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>       := cliente<br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"nomcontacto\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>     := contacto<br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"cargo\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>           := cargo<br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"email1email2\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>    := email1_2<br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"telefono\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>        := telefono<br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"direccion\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>     := direccion<br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"pais\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>          := pais<br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"ciudad\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>        := ciudad<br />oRS:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"asignado_a\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">value</span>    := asignadoa<br />oRS:<span style=\"color: #0000ff;\">Update</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oRS:<span style=\"color: #000000;\">Sort</span>:=<span style=\"color: #ff0000;\">\"nomcuenta\"</span><br /><br />oRs:<span style=\"color: #000000;\">BookMark</span>:=nBookMark                        <br /> </div>[/code:25sozvda]", "time": "21:54", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "lafug" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-10-14", "forum": "FiveWin para Harbour/xHarbour", "text": "Lafug.\n\nLocal oErrorAdo\n\n...\n...\n...\n...\n...\n...\n\n TRY\n oRs:Update()\n CATCH oErrorAdo\n MsgAlert(oErrorAdo)\n END\n\n\nCon esto capturas el error desde ADO y puedes ver que es lo que realmente esta sucediendo.\nSeria bueno que copiaras aqui la estructura de la tabla completa, y supongo que lo que estas grabando pertenece solo a una tabla ?\n\nSaludos", "time": "13:58", "topic": "ADO MYSQL se cae con 2 usuarios modificando mismo registro", "username": "Adolfo" } ]
ADO MYSQL se cae con 2 usuarios modificando mismo registro
[ { "date": "2011-12-09", "forum": "FiveWin for Harbour/xHarbour", "text": "To All\n\nI have a Sql statement that runs fine using the Ms Access instr() function and I am trying to modify the script to a filter condition...\n\nThis is the Sql statement that runs from the Open() line :\n\n[code=fw:19up7w7d]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />cSQL := <span style=\"color: #ff0000;\">\"SELECT * FROM REQUEST where instr(PARTDESC,'ba') > 0\"</span> <br /><br />oRsReq := TOleAuto<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">&#41;</span><br />oRsReq:<span style=\"color: #000000;\">CursorType</span>     := <span style=\"color: #000000;\">1</span>        <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsReq:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// local cache</span><br />oRsReq:<span style=\"color: #000000;\">LockType</span>       := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />  oRsReq:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span>cSQL,xConnect <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />  <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening REQUEST table\"</span> <span style=\"color: #000000;\">&#41;</span><br />  <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /> </div>[/code:19up7w7d]\n\nUnfortunately, I can not translate it to a filter condition :\n\noRsReq:Filter := \"\"\noRsReq:Filter := \"instr(PARTDESC,'ba') > 0\"\n\nErrors with :\n\nApplication\n===========\n Path and name: C:\\Fox\\SourceParts\\SourceW32.Exe (32 bits)\n Size: 2,086,912 bytes\n Time from start: 0 hours 0 mins 1 secs \n Error occurred at: 12/09/2011, 14:25:44\n Error description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: _FILTER\n Args:\n [ 1] = C instr(PARTDESC,'ba') > 0\n\nAny ideas from anyone on how I can make this filter condition work ?\n\nThanks\nRick Lipkin", "time": "20:32", "topic": "ADO Ms Access Filter Condition", "username": "Rick Lipkin" } ]
ADO Ms Access Filter Condition
[ { "date": "2011-12-09", "forum": "FiveWin for Harbour/xHarbour", "text": "Try this sql string\n\ncSQL := \"SELECT * FROM REQUEST where PARTDESC like '%ba%'\"", "time": "20:56", "topic": "ADO Ms Access Filter Condition", "username": "Gale FORd" } ]
ADO Ms Access Filter Condition
[ { "date": "2011-12-09", "forum": "FiveWin for Harbour/xHarbour", "text": "Gale\n\nYour suggestion was correct .. oRsReq:Filter := \"PARTDESC like '%ba%'\" .. For some reason I just had a 'brain freeze' and was thinking like the AT() function .. \n\nThanks\nRick Lipkin", "time": "22:15", "topic": "ADO Ms Access Filter Condition", "username": "Rick Lipkin" } ]
ADO Ms Access Filter Condition
[ { "date": "2015-06-03", "forum": "FiveWin for Harbour/xHarbour", "text": "To All\n\nI have a Customer Module that Opens 3 tables from a MS Access database and when I chose a different customer the tables get refreshed by closing them and re-opening them( _custedit() ). The close and re-open process works GREAT on 32 bit Windows XP, but times out on the re-open [Customer Item] table and breaks in the _CustEdit Function.\n\nHere is the code .. all the oRs variables were defined local at the top of the program and passed normally thru the various Functions.\n\nAgain, this code works flawlessly on WinXP .. but 'barfs' using Windows 7. I have tried to stay away from using Static oRs variables because this is a MDI application and if the Customer module is opened twice on I have memory 'bleed thru' problems between Customer modules.\n\nAny advice would be welcome .. \nRick Lipkin\n[code=fw:7vxng2vg]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />/Top <span style=\"color: #0000ff;\">of</span> Customer module<br /><span style=\"color: #B900B9;\">//------------------------</span><br />Func _CustView<span style=\"color: #000000;\">&#40;</span> cMode,oWndMain <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">Local</span> oDlg,lOk1,cSay,oSay,cDefa<br /><span style=\"color: #00C800;\">Local</span> oRsCust,oRsInvoice,oRsShip,oRsItem<br /><br />oRsCust     := <span style=\"color: #ff0000;\">\" \"</span><br />oRsInvoice  := <span style=\"color: #ff0000;\">\" \"</span><br />oRsShip     := <span style=\"color: #ff0000;\">\" \"</span><br />oRsItem     := <span style=\"color: #ff0000;\">\" \"</span><br /><br /><br />cDEFA := SET<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">&#41;</span><br /><br />LightGreyGrad<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />lOK1   := .F.<br /><br /><span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">RESOURCE</span> <span style=\"color: #ff0000;\">\"FILECHK\"</span>       ;<br />       <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"Please be patient\"</span><br /><br />       cSAY :=  <span style=\"color: #ff0000;\">\"Opening Tables\"</span><br />       <span style=\"color: #0000ff;\">REDEFINE</span> <span style=\"color: #0000ff;\">SAY</span> oSay <span style=\"color: #0000ff;\">var</span> cSay <span style=\"color: #0000ff;\">ID</span> <span style=\"color: #000000;\">120</span> <span style=\"color: #0000ff;\">of</span> oDLG <span style=\"color: #0000ff;\">UPDATE</span><br /><br />       oDLG:<span style=\"color: #000000;\">bStart</span> := <span style=\"color: #000000;\">&#123;</span> || lOK1 := _OpenUm0<span style=\"color: #000000;\">&#40;</span> oDLG,oSAY,@cSAY,@oRsCust,@oRsInvoice,@oRsShip,@oRsItem <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDLG <span style=\"color: #0000ff;\">CENTERED</span><br /><br />oSay := <span style=\"color: #00C800;\">NIL</span><br />cSay := <span style=\"color: #00C800;\">NIL</span><br /><br /><span style=\"color: #00C800;\">IF</span> lOK1 = .F.<br />   <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #00C800;\">NIL</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />_CustView1<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"A\"</span>,oWndMain,oRsCust,oRsInvoice,oRsShip,oRsItem<span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">&#40;</span>.t.<span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//----------------</span><br /><span style=\"color: #00C800;\">Static</span> Func _OpenUm0<span style=\"color: #000000;\">&#40;</span> oDlg, oSay,cSay, oRsCust,oRsInvoice,oRsShip,oRsItem <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">Local</span> cSql,oErr<br /><br />cSay := <span style=\"color: #ff0000;\">\"Opening Customer Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">// relational key</span><br /><br />cSQL := <span style=\"color: #ff0000;\">\"SELECT * from CUSTOMER order by [Last Name],[First Name]\"</span><br /><br />oRsCust := TOleAuto<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">&#41;</span><br />oRsCust:<span style=\"color: #000000;\">CursorType</span>     := <span style=\"color: #000000;\">1</span>        <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsCust:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// local cache</span><br />oRsCust:<span style=\"color: #000000;\">LockType</span>       := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />   oRsCust:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />   <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening CUSTOMER table\"</span> <span style=\"color: #000000;\">&#41;</span><br />   oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br />oRsCust:<span style=\"color: #000000;\">Filter</span> := <span style=\"color: #ff0000;\">\"\"</span><br />oRsCust:<span style=\"color: #000000;\">Filter</span> := <span style=\"color: #ff0000;\">\"[Last Name] = 'bogus'\"</span><br /><br /><span style=\"color: #B900B9;\">// service address tab</span><br />cSay := <span style=\"color: #ff0000;\">\"Opening Customer ShipTo Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />cSQL := <span style=\"color: #ff0000;\">\"SELECT * from [CUSTOMER SHIPTO] where 1 = 2 order by [Customer Id], [Address1]\"</span><br /><br />oRsShip := TOleAuto<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">&#41;</span><br />oRsShip:<span style=\"color: #000000;\">CursorType</span>     := <span style=\"color: #000000;\">1</span>        <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsShip:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// local cache</span><br />oRsShip:<span style=\"color: #000000;\">LockType</span>       := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />   oRsShip:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />   oRsCust:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening CUSTOMER SHIPTO table\"</span> <span style=\"color: #000000;\">&#41;</span><br />   oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br /><span style=\"color: #B900B9;\">// electronics tab</span><br />cSay := <span style=\"color: #ff0000;\">\"Opening Customer Item Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />cSql := <span style=\"color: #ff0000;\">\"SELECT \"</span><br />cSql += <span style=\"color: #ff0000;\">\"[Key],[Customer Id],[Model Number],[Manufacturer Name],[Product Class],[Serial Number] \"</span><br />cSql += <span style=\"color: #ff0000;\">\"From [Customer Item] \"</span><br />cSql += <span style=\"color: #ff0000;\">\"Where 1 = 2 Order by [Customer Id],[Serial Number]\"</span><br /><br />oRsItem := TOleAuto<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">&#41;</span><br />oRsItem:<span style=\"color: #000000;\">CursorType</span>     := <span style=\"color: #000000;\">1</span>        <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsItem:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// local cache</span><br />oRsItem:<span style=\"color: #000000;\">LockType</span>       := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />   oRsItem:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />   oRsCust:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   oRsShip:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening CUSTOMER ITEM table\"</span> <span style=\"color: #000000;\">&#41;</span><br />   oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br /><span style=\"color: #B900B9;\">// invoice table</span><br />cSay := <span style=\"color: #ff0000;\">\"Opening Invoice Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />cSql := <span style=\"color: #ff0000;\">\"SELECT \"</span><br />cSql += <span style=\"color: #ff0000;\">\"[Repair Number], [Transaction Type], [Customer Id],[Invoiced Date], \"</span><br />cSql += <span style=\"color: #ff0000;\">\"[Total], [Balance] \"</span><br />cSql += <span style=\"color: #ff0000;\">\"From Invoice where 1 = 2 Order by [Invoiced Date] DESC\"</span><br /><br />oRsInvoice := TOleAuto<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">&#41;</span><br />oRsInvoice:<span style=\"color: #000000;\">CursorType</span>     := <span style=\"color: #000000;\">1</span>        <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsInvoice:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// local cache</span><br />oRsInvoice:<span style=\"color: #000000;\">LockType</span>       := <span style=\"color: #000000;\">3</span>        <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />   oRsInvoice:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />   oRsCust:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   oRsShip:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   oRsItem:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening INVOICE table\"</span> <span style=\"color: #000000;\">&#41;</span><br />   oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br />oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">&#40;</span>.t.<span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//-------------------------------</span><br />FUNC _Custview1<span style=\"color: #000000;\">&#40;</span> cMODE,oWnd,oRsCust,oRsInvoice,oRsShip,oRsItem <span style=\"color: #000000;\">&#41;</span><br /><br />...<br />...<br />...<br /><span style=\"color: #B900B9;\">// double click on xBrowse new Customer and I close and reopen the tables and here</span><br /><span style=\"color: #B900B9;\">// is where I have problems</span><br /><br />oLbx:<span style=\"color: #000000;\">bLDblClick</span> := <span style=\"color: #000000;\">&#123;</span> |nRow,nCol | _CustEdit<span style=\"color: #000000;\">&#40;</span> oRsCust,oRsShip,oRsItem,oRsInvoice,cCustomerId ..... <span style=\"color: #000000;\">&#41;</span><br /><br />...<br />...<br /><br /><br /><br /><span style=\"color: #B900B9;\">//---------------------</span><br /><span style=\"color: #00C800;\">Static</span> Func _CustEdit<span style=\"color: #000000;\">&#40;</span> oRsCust,oRsShip,oRsItem,oRsInvoice,cCustomerId... more variables <span style=\"color: #000000;\">&#41;</span><br /><br />...<br />_OpenUm<span style=\"color: #000000;\">&#40;</span> oDLG,oSAY,cSAY,oRsItem,oRsInvoice,oRsShip,cCustomerId <span style=\"color: #000000;\">&#41;</span><br />...<br />...<br /><br /><span style=\"color: #B900B9;\">// sets up the recordset for this customer down stream</span><br /><span style=\"color: #B900B9;\">//--------------------</span><br /><span style=\"color: #00C800;\">Static</span> Func _OpenUm<span style=\"color: #000000;\">&#40;</span> oDLG,oSAY,cSAY,oRsItem,oRsInvoice,oRsShip,cCustomerId <span style=\"color: #000000;\">&#41;</span><br /><br />...<br />...<br /><br /><span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">RESOURCE</span> <span style=\"color: #ff0000;\">\"FILECHK\"</span>       ;<br />       <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"Please be patient\"</span><br /><br />       cSAY :=  <span style=\"color: #ff0000;\">\"Opening Tables\"</span><br />       <span style=\"color: #0000ff;\">REDEFINE</span> <span style=\"color: #0000ff;\">SAY</span> oSay <span style=\"color: #0000ff;\">var</span> cSay <span style=\"color: #0000ff;\">ID</span> <span style=\"color: #000000;\">120</span> <span style=\"color: #0000ff;\">of</span> oDLG <span style=\"color: #0000ff;\">UPDATE</span><br /><br />       oDLG:<span style=\"color: #000000;\">bStart</span> := <span style=\"color: #000000;\">&#123;</span> || lOK1 := _OpenUm<span style=\"color: #000000;\">&#40;</span> oDLG,oSAY,@cSAY,oRsItem,oRsInvoice,oRsShip,cCustomerId <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDLG <span style=\"color: #0000ff;\">CENTERED</span><br /><br />oSay := <span style=\"color: #00C800;\">NIL</span><br />cSay := <span style=\"color: #00C800;\">NIL</span><br /><br /><span style=\"color: #00C800;\">IF</span> lOK1 = .F.<br />    <span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">&#40;</span>.f.<span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />   oLbxA:<span style=\"color: #000000;\">MakeTotals</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>     <span style=\"color: #B900B9;\">// invoices</span><br />   oLbxA:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   oLbx2:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>        <span style=\"color: #B900B9;\">// service items</span><br />   oLbx3:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>        <span style=\"color: #B900B9;\">// service locations</span><br /><br /><span style=\"color: #00C800;\">Endif</span><br /><br /><span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">&#40;</span>.t.<span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//--------------------------</span><br /><span style=\"color: #00C800;\">Static</span> Func _OpenUm<span style=\"color: #000000;\">&#40;</span> oDLG,oSAY,cSAY,oRsItem,oRsInvoice,oRsShip,cCustomerId <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">Local</span> cSql,oErr<br /><br />oRsItem:<span style=\"color: #000000;\">Filter</span> := <span style=\"color: #ff0000;\">\"\"</span><br />oRsItem:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />oRsInvoice:<span style=\"color: #000000;\">Filter</span> := <span style=\"color: #ff0000;\">\"\"</span><br />oRsInvoice:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oRsShip:<span style=\"color: #000000;\">Filter</span> := <span style=\"color: #ff0000;\">\"\"</span><br />oRsShip:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />cSay := <span style=\"color: #ff0000;\">\"Opening Item Customer ShipTo Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />cSQL := <span style=\"color: #ff0000;\">\"SELECT * from [CUSTOMER SHIPTO] where [Customer Id] = '\"</span>+alltrim<span style=\"color: #000000;\">&#40;</span>cCustomerId<span style=\"color: #000000;\">&#41;</span>+<span style=\"color: #ff0000;\">\"'\"</span><br />cSql += <span style=\"color: #ff0000;\">\" order by [Customer Id], [Address1]\"</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />   oRsShip:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />   <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening CUSTOMER SHIPTO table\"</span> <span style=\"color: #000000;\">&#41;</span><br />   oDlg:<span style=\"color: #000000;\">ENd</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br />cSay := <span style=\"color: #ff0000;\">\"Opening Invoice Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />cSql := <span style=\"color: #ff0000;\">\"SELECT \"</span><br />cSql += <span style=\"color: #ff0000;\">\"[Repair Number], [Transaction Type], [Customer Id],[Invoiced Date], \"</span><br />cSql += <span style=\"color: #ff0000;\">\"[Total], [Balance] \"</span><br />cSql += <span style=\"color: #ff0000;\">\"From Invoice Where [Customer Id] = '\"</span>+alltrim<span style=\"color: #000000;\">&#40;</span>cCustomerId<span style=\"color: #000000;\">&#41;</span>+<span style=\"color: #ff0000;\">\"'\"</span><br />cSql += <span style=\"color: #ff0000;\">\" Order by [Invoiced Date] DESC\"</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />   oRsInvoice:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />   <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening INVOICE table\"</span> <span style=\"color: #000000;\">&#41;</span><br />   oDlg:<span style=\"color: #000000;\">ENd</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br /><span style=\"color: #B900B9;\">////////////////////</span><br /><span style=\"color: #B900B9;\">//////////////// locks up here on this table</span><br /><span style=\"color: #B900B9;\">//////////////// only with Window 7</span><br /><span style=\"color: #B900B9;\">/////////////////</span><br /><br />cSay := <span style=\"color: #ff0000;\">\"Opening Item Detail Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />cSql := <span style=\"color: #ff0000;\">\"SELECT \"</span><br />cSql += <span style=\"color: #ff0000;\">\"[Key],[Customer Id],[Model Number],[Manufacturer Name],[Product Class],[Serial Number] \"</span><br />cSql += <span style=\"color: #ff0000;\">\"From [Customer Item] \"</span><br />cSql += <span style=\"color: #ff0000;\">\"Where [Customer Id] = '\"</span>+alltrim<span style=\"color: #000000;\">&#40;</span>cCustomerId<span style=\"color: #000000;\">&#41;</span>+<span style=\"color: #ff0000;\">\"' Order by [Customer Id],[Serial Number]\"</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />  oRsItem:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />  <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening CUSTOMER ITEM table\"</span> <span style=\"color: #000000;\">&#41;</span><br />  <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br />oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">&#40;</span>.t.<span style=\"color: #000000;\">&#41;</span><br /> </div>[/code:7vxng2vg]\n[img:7vxng2vg]http&#58;//i60&#46;tinypic&#46;com/2vabh4i&#46;jpg[/img:7vxng2vg]", "time": "22:59", "topic": "ADO Ms Access SLow Close() and Re-Open tables on Win 7", "username": "Rick Lipkin" } ]
ADO Ms Access SLow Close() and Re-Open tables on Win 7
[ { "date": "2015-06-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Rick:\n\nJust an idea, I have not W7, what if you remove the refresh code\n\n[code=fw:ijl8i21a]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />cSay := <span style=\"color: #ff0000;\">\"Opening Item Customer ShipTo Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>    <span style=\"color: #B900B9;\">// This one</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>       <span style=\"color: #B900B9;\">// And this one too</span><br /><br />cSQL := <span style=\"color: #ff0000;\">\"SELECT * from [CUSTOMER SHIPTO] where [Customer Id] = '\"</span>+alltrim<span style=\"color: #000000;\">&#40;</span>cCustomerId<span style=\"color: #000000;\">&#41;</span>+<span style=\"color: #ff0000;\">\"'\"</span><br />cSql += <span style=\"color: #ff0000;\">\" order by [Customer Id], [Address1]\"</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />   oRsShip:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />   <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening CUSTOMER SHIPTO table\"</span> <span style=\"color: #000000;\">&#41;</span><br />   oDlg:<span style=\"color: #000000;\">ENd</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br />cSay := <span style=\"color: #ff0000;\">\"Opening Invoice Table\"</span><br />oSay:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>     <span style=\"color: #B900B9;\">// This one</span><br />SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>        <span style=\"color: #B900B9;\">// And this one too</span><br /> </div>[/code:ijl8i21a]\n\nRegards", "time": "00:23", "topic": "ADO Ms Access SLow Close() and Re-Open tables on Win 7", "username": "Armando" } ]
ADO Ms Access SLow Close() and Re-Open tables on Win 7
[ { "date": "2015-06-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Armando\n\nI think I am going to revise my Customer screen and instead of opening 4 tables, just open the Customer and Invoice and have buttons for the other tables to click and open the other two tables on demand.\n\nI would still like to know why the my current code works GREAT on XP but hangs when closing and re-opening the same table(s) with the same fields with only a parameter change.\n\nThanks\nRick Lipkin", "time": "13:49", "topic": "ADO Ms Access SLow Close() and Re-Open tables on Win 7", "username": "Rick Lipkin" } ]
ADO Ms Access SLow Close() and Re-Open tables on Win 7
[ { "date": "2009-01-16", "forum": "FiveWin for Harbour/xHarbour", "text": "All,\n\nI want to open an ado connection to an access database using the adModeShareExclusive mode (12). Can someone give me an example for doing this?\n\nThis is what I'm using now:\n\n oConn := CREATEOBJECT( \"ADODB.Connection\" )\n oConn:Open(\"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"+cDataSource)\n\ncDataSource is the path and name of my .mdb file. The above works fine. I can get the mode with oConn:Mode, which returns 16. However I cannot find the correct syntax to specify or set the mode.\n\nThanks,\nRandal", "time": "20:36", "topic": "ADO Open Question", "username": "Randal" } ]
ADO Open Question
[ { "date": "2009-01-16", "forum": "FiveWin for Harbour/xHarbour", "text": "Probably you are trying to set Mode property when the connection is open. From MSDN:\n\n[quote:37xe5ds7]You can set the Mode property only when the Connection object is closed.[/quote:37xe5ds7]\n\nEMG", "time": "23:57", "topic": "ADO Open Question", "username": "Enrico Maria Giordano" } ]
ADO Open Question
[ { "date": "2009-01-20", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nThanks, that helps.\n\nRandal", "time": "17:32", "topic": "ADO Open Question", "username": "Randal" } ]
ADO Open Question
[ { "date": "2014-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "HI,\n\nThis code sometimes work ok, sometimes produce error:\nError description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: MOVEFIRST\n\n[code=fw:1oauv2qz]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">try</span><br />   oRs := TOleAuto<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'ADODB.RecordSet'</span> <span style=\"color: #000000;\">&#41;</span><br />   WITH OBJECT oRs<br />      :<span style=\"color: #000000;\">ActiveConnection</span> := oCn<br />      :<span style=\"color: #000000;\">Source</span>           := <span style=\"color: #ff0000;\">'SELECT * from mytable'</span><br />      :<span style=\"color: #000000;\">CursorLocation</span>   := <span style=\"color: #000000;\">3</span>  <br />      :<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   END<br />catch oErr<br />   FW_ShowAdoError<span style=\"color: #000000;\">&#40;</span>oCn<span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">return</span> .f.<br />end <span style=\"color: #00C800;\">try</span><br /><br />oRs:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />.<br />.<br />.<br /><br />oRs:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oCn:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /> </div>[/code:1oauv2qz]\n\nAfter few days i have seen that it is huppaning when table is empty\n\nIs that mean that we must always control oRs:RecordCount ????\nIs that standard ADO behavior or therw is some other solution ?\n\nSecond case\nIF :Source is not SELECT statement for example \n:Source := 'SET PDQPRIORITY 95'\nthan oRs:State = 0 and all Methods produce error ...\nError description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: CLOSE\nQuestion: IS sql statement executed ?\nIS that mean thet in this cases it is not need of closing recordset ?\nMust control oRs:State in any cases ?\n\nIn this case [b:1oauv2qz]CATCH oErr[/b:1oauv2qz] dont report error ...\n\nONE MORE Qusetion.\nIf SQL statement is executed ... is server returning message what is maded ?\nSomething like \"100 Records inserted\"\nIf yes how can i get that message ?\nIS there some function like FW_ShowAdoResult(oCn) ?\n\nBest Regards,", "time": "11:07", "topic": "ADO Problem", "username": "avista" } ]
ADO Problem
[ { "date": "2014-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "Avista,\n\nIt's normal that you get an error if you do a oRs:MoveFirst() on a empty recordset.\n\nThat's why I use\n[code=fw:37ebt5aw]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">IF</span> !oRs:<span style=\"color: #000000;\">eof</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   oRs:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   ...<br /><br /><span style=\"color: #00C800;\">ENDIF</span><br />&nbsp;</div>[/code:37ebt5aw]\n\nI don't know what you mean for the second case.", "time": "12:19", "topic": "ADO Problem", "username": "Marc Vanzegbroeck" } ]
ADO Problem
[ { "date": "2014-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "cSql := \"UPDATE ......\" or \"INSERT INTO ...\"\n\noCn:Execute( cSql, @nRows, adCmdText )\n? nRows", "time": "23:56", "topic": "ADO Problem", "username": "nageswaragunupudi" } ]
ADO Problem
[ { "date": "2014-07-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Marc, Rao\n\nThanks for reply\n\nRegards,", "time": "13:42", "topic": "ADO Problem", "username": "avista" } ]
ADO Problem
[ { "date": "2013-06-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI would like to use a Harbour function in a where clause.\n\nI need to pass to Harbour´s function the value from the SQL TABLE:\n\ncSQLi1 := \"SELECT * FROM APUNTES WHERE MyFunction(FECHA) = '1' \"\n\nThat gives an error indicating that MyFunction is not defined on the SQL engine.\n\n\nSo I tried with no luck\n\n\"SELECT * FROM APUNTES WHERE \"+ MyFunction( \"+FECHA+\" ) +\" = '1' \"\n\nBut In MyFunction I don´t get FECHA value, I just retrieve +FECHA+\n\n\nAny advice will be welcomed.\n\n\nThank you very much. Best regards", "time": "13:01", "topic": "ADO QUESTION: using a Harbour function in a WHERE clause", "username": "lucasdebeltran" } ]
ADO QUESTION: using a Harbour function in a WHERE clause
[ { "date": "2013-06-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Lucas,\n\nTry:\n\n\"SELECT * FROM APUNTES WHERE \"+ MyFunction( FECHA ) +\" = '1' \"", "time": "13:13", "topic": "ADO QUESTION: using a Harbour function in a WHERE clause", "username": "Kleyber" } ]
ADO QUESTION: using a Harbour function in a WHERE clause
[ { "date": "2013-06-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank you, but it does not work as FECHA must be returned from SQL, it is a field from the table (FECHA=Date)", "time": "13:18", "topic": "ADO QUESTION: using a Harbour function in a WHERE clause", "username": "lucasdebeltran" } ]
ADO QUESTION: using a Harbour function in a WHERE clause
[ { "date": "2013-06-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Ok, so I would do this way:\n\nMiFecha = MyFunction () // In MyFunction() I'd use the SELECT to get the field FECHA and do the necessary\n\n\"SELECT * FROM APUNTES WHERE \"+ MiFecha +\" = '1' \"", "time": "13:45", "topic": "ADO QUESTION: using a Harbour function in a WHERE clause", "username": "Kleyber" } ]
ADO QUESTION: using a Harbour function in a WHERE clause
[ { "date": "2013-06-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Lucas:\n\nI do this way with xHarbour and MySql\n\n[code=fw:3ieu6bym]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />oRsHdr:<span style=\"color: #000000;\">Source</span>               := <span style=\"color: #ff0000;\">\"SELECT \"</span> +;<br />                                        <span style=\"color: #ff0000;\">\"HdrCot.*,\"</span> +;<br />                                        <span style=\"color: #ff0000;\">\"Clientes.* \"</span> +;<br />                                    <span style=\"color: #ff0000;\">\"FROM \"</span> +;<br />                                        <span style=\"color: #ff0000;\">\"HdrCot \"</span> +;<br />                                    <span style=\"color: #ff0000;\">\"LEFT JOIN \"</span> +;<br />                                        <span style=\"color: #ff0000;\">\"Clientes \"</span> +;<br />                                    <span style=\"color: #ff0000;\">\"ON \"</span> +;<br />                                        <span style=\"color: #ff0000;\">\"HdrCot.Hdr_Cli = Clientes.Cli_Cli \"</span> +;<br />                                    <span style=\"color: #ff0000;\">\"WHERE \"</span> +;<br />                                        <span style=\"color: #ff0000;\">\"YEAR(Hdr_Fde) = '\"</span> + STR<span style=\"color: #000000;\">&#40;</span>nAmo,<span style=\"color: #000000;\">4</span>,<span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\"' \"</span> +;<br />                                    <span style=\"color: #ff0000;\">\"AND \"</span> +;<br />                                        <span style=\"color: #ff0000;\">\"MONTH(Hdr_Fde) = '\"</span> + STR<span style=\"color: #000000;\">&#40;</span>nMes,<span style=\"color: #000000;\">2</span>,<span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\"' \"</span> +;<br />                                    <span style=\"color: #ff0000;\">\"ORDER BY \"</span> +;<br />                                        <span style=\"color: #ff0000;\">\"Hdr_Cot\"</span><br /> </div>[/code:3ieu6bym]\n\nRegards", "time": "17:04", "topic": "ADO QUESTION: using a Harbour function in a WHERE clause", "username": "Armando" } ]
ADO QUESTION: using a Harbour function in a WHERE clause
[ { "date": "2013-06-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Armando,\n\nMuchas gracias, pero no es lo que necesito, porque Month es una función de MySQL.\n\nSin Embargo, no está presente en SQLite.\n\nImagina que quieres usar otra función tuya.\n\nMuchas gracias en todo caso.", "time": "18:48", "topic": "ADO QUESTION: using a Harbour function in a WHERE clause", "username": "lucasdebeltran" } ]
ADO QUESTION: using a Harbour function in a WHERE clause
[ { "date": "2013-06-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Armando,\n\nMuchas gracias, pero no es lo que necesito, porque Month es una función de MySQL.\n\nSin Embargo, no está presente en SQLite.\n\nImagina que quieres usar otra función tuya.\n\nMuchas gracias en todo caso.", "time": "18:50", "topic": "ADO QUESTION: using a Harbour function in a WHERE clause", "username": "lucasdebeltran" } ]
ADO QUESTION: using a Harbour function in a WHERE clause
[ { "date": "2013-06-24", "forum": "FiveWin for Harbour/xHarbour", "text": "If it is MySql, MsSql, Oracle etc I create a sql function on the server with the same functionality of MyFunction. SQL statements can use that function.\n\nI am not sure if SqLite allows creation of server-side procedures and functions.\n\nAnother way is to maintain a calculated column in the same table which stores the same result as myfunction(fecha) in another column and use that column in the where clause.", "time": "05:21", "topic": "ADO QUESTION: using a Harbour function in a WHERE clause", "username": "nageswaragunupudi" } ]
ADO QUESTION: using a Harbour function in a WHERE clause
[ { "date": "2007-06-30", "forum": "FiveWin for Harbour/xHarbour", "text": "I have this error testing MS SQL and MySQL.\n\nIs there a way to get more information of the error.\n\nI have used this code with MySQL\n\n[code:1h7oj8pj]#Include \"FiveWin&#46;Ch\"\n#include \"adordd&#46;ch\"\n\nREQUEST ADORDD\n\nfunction TstMySql&#40;&#41;\n\n USE test1 VIA \"ADORDD\" TABLE \"tabel1\" MYSQL ;\n FROM \"LOCALHOST\" USER \"ROOT\" PASSWORD \"\"\n\n Browse&#40;&#41;\n\n USE\n\nreturn nil\n[/code:1h7oj8pj]\n\nAny idea\n\nThanks,\n\nWilly Hermans", "time": "12:16", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "Willy,\n\nTry to connect to your database and table using an application like Navicat (<!-- w --><a class=\"postlink\" href=\"http://www.navicat.com\">www.navicat.com</a><!-- w -->) and check if it works fine", "time": "07:38", "topic": "ADO RDD connection error 16389", "username": "Antonio Linares" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "Thanks Antonio,\n\nI'll try it asap.\n\nThe MySQL that I use is a version with PHP. It has already a management system.\n\nIs it possible that not all versions (i.e. version 5) are supported\n\nThanks\n\nWilly Hermans", "time": "09:10", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "I've just tested it with Navicat.\n\nThe connection works fine.\n\nGreetings\nWilly", "time": "09:27", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "Willy,\n\n> TABLE \"tabel1\"\n\nIsn't there a typo ? \"table1\" ?", "time": "10:00", "topic": "ADO RDD connection error 16389", "username": "Antonio Linares" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "No tabel is just the dutch word for table\n\nGreetings\n\nWilly", "time": "10:19", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "ok <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nPlease try using \"localhost\" in lower case or 127.0.0.1", "time": "11:21", "topic": "ADO RDD connection error 16389", "username": "Antonio Linares" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "After reinstalling MySQL and ODBC drivers the connection works\n\nThanks.\n\nWilly", "time": "12:49", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "Now I've tried to connect from another pc.\n\nThis does still not work.\n\nI've tried with the ip adres of the pc that holds the mysql server software.\n\nI've tried with the networkname of the pc...\n\nI've tried with \"\\\\pcname\\localhost\" and so on.\n\nWhat are exacly the possibilities for adressing the connection.\n\nThanks,\n\nWilly Hermans\n\nMS-SQL works already from a network pc", "time": "15:59", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-01", "forum": "FiveWin for Harbour/xHarbour", "text": "Willy,\n\n> What are exacly the possibilities for adressing the connection\n\nWe don't know it for sure. ADORDD is just a layer that uses ADO. If ADO works then the ADORDD should work too.", "time": "17:17", "topic": "ADO RDD connection error 16389", "username": "Antonio Linares" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Thanks Fernando,\n\nI've done some tests.\n\nThere seems to be something wrong with the MySQL server.\n\nI have reinstalled the server several times.\n\nWhen I use EasyPhp 1.7 or 1.8 (This includes MySQL 5) the program works local but the server is not detected at another PC in the network.\n\nI have used navicat and MySQL Administrator.\n\nMaybe the MySQL server is automatically installed as a local server.\nI can not find a setting to change that.\n\nWhen I do'nt use EasyPHP but the usual MySQL 5 the program does not work on any pc. In that case I have a connection error but the server is detected on other pc's.\n\nI think I have to search a forum for MySQL beginners.\n\nSomeone any idea ?\n\nThanks.\n\nWilly.", "time": "10:57", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-02", "forum": "FiveWin for Harbour/xHarbour", "text": "I have just finished some tests.\n\n1) Format C\n2) Reinstall XP service pack 2\n3) disable firewall\n4) Install MySQL 5\n\nrun this code\n\n[code:fc8lfcxk]#Include \"FiveWin&#46;Ch\"\n\n#include \"adordd&#46;ch\"\n\nREQUEST ADORDD\n\nfunction TstMySql&#40;&#41;\n\n USE test VIA \"ADORDD\" TABLE \"tabel1\" MYSQL ;\n FROM \"localhost\" USER \"root\" password \"ikke\"\n\n* USE test00 VIA \"ADORDD\" TABLE \"ACCOUNTS\" MYSQL ;\n* FROM \"www&#46;freesql&#46;org\" USER \"myuser\" PASSWORD \"mypass\"\n\n Browse&#40;&#41;\n\n USE\n\nreturn nil[/code:fc8lfcxk]\n\nThis works fine on the pc were MySQL is installed. It does not work on any other pc.\n\nSo I changed \"localhost\" into \"192.168.0.101\" and \"testpc\" and \"TESTPC\"\n\nThis did not work on any pc. But the error is different\nNow it is not a [b:fc8lfcxk]ADODB/Connection[/b:fc8lfcxk] error but it is a \n[b:fc8lfcxk]ADODB Recordset[/b:fc8lfcxk] error.\n\nWith Navicat it was easy to open as \"testpc\" , \"TESTPC\" , \"192.168.0.101\"\n\nIs it possible that this is not yet supported in ADORDD\n\nThanks,\n\nWilly Hermans[/code]", "time": "15:48", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Willy,\n\nPlease show us your code using \"testpc\"", "time": "17:59", "topic": "ADO RDD connection error 16389", "username": "Antonio Linares" } ]
ADO RDD connection error 16389
[ { "date": "2007-07-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello Antonio,\n\nHere it is.\n\n\n[code:1g8211a0]#include \"adordd&#46;ch\"\n\nREQUEST ADORDD\n\nfunction TstMySql&#40;&#41;\n\n USE test VIA \"ADORDD\" TABLE \"tabel1\" MYSQL ;\n FROM \"testpc\" USER \"root\" password \"pas\"\n\n* USE test00 VIA \"ADORDD\" TABLE \"ACCOUNTS\" MYSQL ;\n* FROM \"www&#46;freesql&#46;org\" USER \"myuser\" PASSWORD \"mypass\"\n\n Browse&#40;&#41;\n\n USE\n\nreturn nil[/code:1g8211a0]\n\nGreetings\n\nWilly Hermans", "time": "18:11", "topic": "ADO RDD connection error 16389", "username": "Willy" } ]
ADO RDD connection error 16389
[ { "date": "2015-02-27", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nIs there a stable Rdd for ADO working for basic operations such as replaces, browses, like other rdds?\n\nRegards\nAntonio", "time": "10:05", "topic": "ADO RDD xHarbour", "username": "AHF" } ]
ADO RDD xHarbour
[ { "date": "2015-02-27", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio,\n\nYou don't need a RDD. Please review these easy examples:\n\n[url:2rmtf3tf]http&#58;//wiki&#46;fivetechsoft&#46;com/doku&#46;php?id=ado_create_database[/url:2rmtf3tf]\n\n[url:2rmtf3tf]http&#58;//wiki&#46;fivetechsoft&#46;com/doku&#46;php?id=ado_import_dbf[/url:2rmtf3tf]\n\n[url:2rmtf3tf]http&#58;//wiki&#46;fivetechsoft&#46;com/doku&#46;php?id=ado_mdi_browse[/url:2rmtf3tf]", "time": "22:06", "topic": "ADO RDD xHarbour", "username": "Antonio Linares" } ]
ADO RDD xHarbour
[ { "date": "2015-02-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio,\n\nI work already with ADO that way, however I'm converting an old and large application with FW and xHarbour and the way app is desinged it will be vey time consuming to make that approach.\nThe app doesnt has any kind of Tdata objects to encapsulate the Skips, replaces etc that are spreaded all around the code.\nI have a low budget for this work so my idea is to using an rdd.\nMeanwhile I've found out ADORDD from 2007.\nIt seems to me that all these basics actions are covered. \n\nDo you think that this can work?\nDo you have any ideas of another low cost approach?\n\nThanks", "time": "09:44", "topic": "ADO RDD xHarbour", "username": "AHF" } ]
ADO RDD xHarbour
[ { "date": "2015-02-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio,\n\nYes, ADORDD may help you, may it has never been tested in a large application so I don't know how it may behave.\n\nIf you have the time and energy to test it and to complete it then it may be a very good solution for you and for other users too.\n\nI am not aware of any other solution except the commercial SQLRDD. Thats why I thought that a free ADORDD could be very usefull \nand I started its development but had no time to do more <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "11:13", "topic": "ADO RDD xHarbour", "username": "Antonio Linares" } ]
ADO RDD xHarbour