messages
listlengths 1
1
| topic
stringlengths 2
60
|
---|---|
[
{
"date": "2014-07-31",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Baxajaun\":24fy610s]Hi Avista,\n\ni've tried in my sqlite installation the following code\n[code=fw:24fy610s]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">insert into test <span style=\"color: #000000;\">(</span>campo1,campo2<span style=\"color: #000000;\">)</span> values <span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">'1'</span>,<span style=\"color: #ff0000;\">'texto1'</span><span style=\"color: #000000;\">)</span>,<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">'2'</span>,<span style=\"color: #ff0000;\">'texto2'</span><span style=\"color: #000000;\">)</span></div>[/code:24fy610s] and no error.\n\nMy table test structure:\n\ncampo1 numeric\ncampo2 text\n\nCan you put here your error ?\n\nBest regards[/quote:24fy610s]\nMany servers support multiple row inserts this way or similar way.\n(Note: FW_AdoImportFromDBF() uses the syntax appropriate for different servers using multiple row insert statements)\n\nInformix does not support.\nWe need to do single row inserts only.\nParameterized queries as suggested above will improve the speeds.",
"time": "02:14",
"topic": "ADO & SQL INSERT Statement",
"username": "nageswaragunupudi"
}
] |
ADO & SQL INSERT Statement
|
[
{
"date": "2014-07-31",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thanks to all for reply\n\n[quote:kqhmii31]INSERT INTO <table> SELECT <rows,static data,...> FROM <table> WHERE <cond>[/quote:kqhmii31]\nThis is not problem but problem is to INSERT data from .TXT or .DBF file.\n\n[quote:kqhmii31]i've tried in my sqlite installation the following code\nCODE: SELECT ALL EXPAND VIEW\ninsert into test (campo1,campo2) values ('1','texto1'),('2','texto2')\nand no error.[/quote:kqhmii31]\n\nBut like Rao said,\n[quote:kqhmii31]Informix does not support.\nWe need to do single row inserts only.[/quote:kqhmii31]\n\nStatements UNLOAD TO and LOAD FROM are not standard SQL statements and they are part only in IMB DbAccess\n\nI fond this on IBM info center\n\n[quote:kqhmii31]IBM Informix ODBC Driver Programmer's Manual\nInserting Multiple Rows\nUse an insert cursor to efficiently insert rows into a table in bulk. To create an insert cursor, set the SQL_ENABLE_INSERT_CURSOR attribute using SQLSetStmtOption, then call SQLParamOptions with the number of rows as a parameter. You can create an insert cursor for data types VARCHAR, LVARCHAR, and opaque.\n\nWhen you open an insert cursor, a buffer is created in memory to hold a block of rows. The buffer receives rows of data as the program produces them; then they are passed to the database server in a block when the buffer is full. The buffer reduces the amount of communication between the program and the database server. As a result, the insertions go faster.[/quote:kqhmii31]\n\nProbably i need to find more informations how to CREATE INSERT CURSOR and use it.\nIf someone have experience with this please share\n\n[b:kqhmii31]May be not bad idea FiveWin team to implement using of INSERT CURSOR[/b:kqhmii31]\n\nThanks to all,\nBest regards,",
"time": "07:59",
"topic": "ADO & SQL INSERT Statement",
"username": "avista"
}
] |
ADO & SQL INSERT Statement
|
[
{
"date": "2014-07-31",
"forum": "FiveWin for Harbour/xHarbour",
"text": "This is a very useful information. This can be improved upon.\n\nAlso every provider provides a way to bulk import from text data. That's the fastest way. You may also check on this.",
"time": "08:11",
"topic": "ADO & SQL INSERT Statement",
"username": "nageswaragunupudi"
}
] |
ADO & SQL INSERT Statement
|
[
{
"date": "2014-07-31",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rao, \n\nI found this how to use INSERT CURSOR but still not have idea how to implement in program ... i will try this days\nand please if you have some experiance with this tell me some sugestions\n\n[quote:2xw5ah35]\nIBM Informix Guide to SQL: Tutorial\n\nUsing an Insert Cursor\nThe DECLARE CURSOR statement has many variations. Most are used to create cursors for different kinds of scans over data, but one variation creates a special kind of cursor, called an insert cursor. You use an insert cursor with the PUT and FLUSH statements to efficiently insert rows into a table in bulk.\n\nDeclaring an Insert Cursor\nTo create an insert cursor, declare a cursor to be for an INSERT statement instead of a SELECT statement. You cannot use such a cursor to fetch rows of data; you can use it only to insert them. The following 4GL code fragment shows the declaration of an insert cursor:\n\n DEFINE the_company LIKE customer.company,\n the_fname LIKE customer.fname,\n the_lname LIKE customer.lname\nDECLARE new_custs CURSOR FOR\n INSERT INTO customer (company, fname, lname)\n VALUES (the_company, the_fname, the_lname)\nWhen you open an insert cursor, a buffer is created in memory to hold a block of rows. The buffer receives rows of data as the program produces them; then they are passed to the database server in a block when the buffer is full. The buffer reduces the amount of communication between the program and the database server, and it lets the database server insert the rows with less difficulty. As a result, the insertions go faster.\n\nThe buffer is always made large enough to hold at least two rows of inserted values. It is large enough to hold more than two rows when the rows are shorter than the minimum buffer size.\n\nInserting with a Cursor\nThe code in the previous example prepares an insert cursor for use. The continuation, as the following example shows, demonstrates how the cursor can be used. For simplicity, this example assumes that a function named next_cust returns either information about a new customer or null data to signal the end of input.\n\nEXEC SQL BEGIN WORK;\nEXEC SQL OPEN new_custs;\nwhile(SQLCODE == 0)\n{\n next_cust();\n if(the_company == NULL)\n break;\n EXEC SQL PUT new_custs;\n}\nif(SQLCODE == 0) /* if no problem with PUT */\n{\n EXEC SQL FLUSH new_custs; /* write any rows left */\n if(SQLCODE == 0) /* if no problem with FLUSH */\n EXEC SQL COMMIT WORK; /* commit changes */\n}\nelse\n EXEC SQL ROLLBACK WORK; /* else undo changes */\nThe code in this example calls next_cust repeatedly. When it returns non-null data, the PUT statement sends the returned data to the row buffer. When the buffer fills, the rows it contains are automatically sent to the database server. The loop normally ends when next_cust has no more data to return. Then the FLUSH statement writes any rows that remain in the buffer, after which the transaction terminates.\n\nRe-examine the INSERT statement on page ***. The statement by itself, not part of a cursor definition, inserts a single row into the customer table. In fact, the whole apparatus of the insert cursor can be dropped from the example code, and the INSERT statement can be written into the code where the PUT statement now stands. The difference is that an insert cursor causes a program to run somewhat faster.\n\nStatus Codes After PUT and FLUSH\nWhen a program executes a PUT statement, the program should test whether the row is placed in the buffer successfully. If the new row fits in the buffer, the only action of PUT is to copy the row to the buffer. No errors can occur in this case. However, if the row does not fit, the entire buffer load is passed to the database server for insertion, and an error can occur.\n\nThe values returned into the SQL Communications Area (SQLCA) give the program the information it needs to sort out each case. SQLCODE and SQLSTATE are set to zero after every PUT statement if no error occurs and to a negative error code if an error occurs.\n\nThe database server sets the third element of SQLERRD to the number of rows actually inserted into the table, as follows:\n\nZero, if the new row is merely moved to the buffer\nThe number of rows that are in the buffer, if the buffer load is inserted without error\nThe number of rows inserted before an error occurs, if one did occur\nRead the code once again to see how SQLCODE is used (see the previous example). First, if the OPEN statement yields an error, the loop is not executed because the WHILE condition fails, the FLUSH operation is not performed, and the transaction rolls back. Second, if the PUT statement returns an error, the loop ends because of the WHILE condition, the FLUSH operation is not performed, and the transaction rolls back. This condition can occur only if the loop generates enough rows to fill the buffer at least once; otherwise, the PUT statement cannot generate an error.\n\nThe program might end the loop with rows still in the buffer, possibly without inserting any rows. At this point, the SQL status is zero, and the FLUSH operation occurs. If the FLUSH operation produces an error code, the transaction rolls back. Only when all inserts are successfully performed is the transaction committed.[/quote:2xw5ah35]\n\n[b:2xw5ah35]May be not bad idea FiveWin team to implement using of INSERT CURSOR[/b:2xw5ah35]\n\nBest regards,",
"time": "08:28",
"topic": "ADO & SQL INSERT Statement",
"username": "avista"
}
] |
ADO & SQL INSERT Statement
|
[
{
"date": "2006-11-08",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Buenas a todos,\n\n1) De donde puedo sacar información de las propiedades y metodos de ADO??\n\n2) Quisiera saber que estoy haciendo mal en este código. El Browse con el primer recordset me lo muestra de maravilla, ahora cuando quiero insertar en la tabla F10TAA.DBF el contenido de F10T01 (Las dos son iguales) me da el siguiente error.\n\n Error occurred at: 11/08/06, 04:14:32\n Error description: Error ADODB.RecordSet/14 DISP_E_BADPARAMCOUNT: EXECUTE\n Args:\n\nStack Calls\n===========\n Called from: win32ole.prg => TOLEAUTO:EXECUTE(0)\n Called from: TestAdo.prg => MAIN(105)\n\nEl código más abajo. \n\n\nFUNCTION MAIN() \n\n LOCAL oRs, oRs1, cConn , cConn1 , oErr ,cSQL, cSQL1, cSQL_select, cSQL_from, cSQL_where, cSQL_order\n\n cSQL_select = \"select F10T01.CODINTPRD, F10T01.NOMPRD, F10T01.PRCSUG, F10T01.CODRUB, F10G02.NOMRUB, F10T01.CODBAR \"\n cSQL_from = \"from F10T01, F10G02 \"\n cSQL_where = \"where F10T01.CODRUB = F10G02.CODRUB and F10T01.CODBAR = '8888888888888'\"\n cSQL_order = \"order by F10T01.NOMPRD\"\n \n cSQL = cSQL_select + cSQL_from + cSQL_where + cSQL_order\n \n\t oRs := CreateObject(\"ADODB.RecordSet\") \n\t oRs:CursorLocation := adUseClient \n\t oRs:LockType := adLockOptimistic \n\t oRs:CursorType := adOpenDynamic \n\t oRs:ActiveConnection := \"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\ft\\apl;Extended Properties=dBASE IV\" \n\t oRs:Source := cSQL\n \n TRY \n oRs:Open()\n oRs:MoveFirst()\n \n CATCH oErr \n ? oErr:Description \n RETURN NIL \n END TRY \n\n // Funciona OK!!!!\n\n TCBROWSERECORDSET( oRs ) \n\n oRs:Close() \n\t \n\t oRs := CreateObject(\"ADODB.RecordSet\") \n\t oRs:CursorLocation := adUseClient \n\t oRs:LockType := adLockOptimistic \n\t oRs:CursorType := adOpenDynamic \n\t oRs:ActiveConnection := \"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\ft\\apl;Extended Properties=dBASE IV\" \n\t oRs:Source := cSQL1\n\n// Aquí es donde da el error\n \n cSQL1 = \"insert into F10TAA ( CODINTPRD, NOMPRD, PRCVTA, PRCSUG, CODBAR ) select CODINTPRD, NOMPRD, PRCVTA, PRCSUG, CODBAR from F10T01 where CODBAR = '8888888888888'\"\n\n oRs:Open()\n oRs:Update()\n\n \n oRs:Close() \n\n RETURN NIL\n\n---------------------------------------------------------------------------------\n\nMuchas Gracias a todos,\n\nAriel S Gigliotti",
"time": "08:17",
"topic": "ADO + FWH + DBF + SQL",
"username": "akeyser"
}
] |
ADO + FWH + DBF + SQL
|
[
{
"date": "2006-11-10",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Ariel\n\nMe invadió la duda.... pero prueba a colocar la declaración de la consulta cSQL1 antes de asignarle a\noRs:Source\n\n\ncSQL1 = \"insert into F10TAA ( CODINTPRD, NOMPRD, PRCVTA, PRCSUG, CODBAR ) select CODINTPRD, NOMPRD, PRCVTA, PRCSUG, CODBAR from F10T01 where CODBAR = '8888888888888'\" \n\noRs:Source := cSQL1 \n\n\n\nPuedes enontrar más información de los objetos ADO en \n\n\n[url:qyipp1g4]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdobjfield.asp[/url:qyipp1g4]\n\n\nMarcelo Jingo",
"time": "04:01",
"topic": "ADO + FWH + DBF + SQL",
"username": "sjingo"
}
] |
ADO + FWH + DBF + SQL
|
[
{
"date": "2006-11-10",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Segun mi conocimiento de ADO no deberias de modificar o insertar datos usando un query, ADO tiene metodos para hacer eso directamente.\n\nSi quieres por ejemplo modificar un dato del record set haces:\n\noRs:field(x):Value := lo que quieras\noRs:Update()\n\nsi haces un query que inserte datos en una tabla o que los modfique el resultado de la ejecucion de dicho query, sobre un recordset, lo que este recordset te devuelve NO ES LA TABLA CON EL REGISTRO ACTUALIZADO O MODIFICADO, el recorset regresa el resultado de la operacion realizada, puede ser un valor numerico, o un valor logico, pero nunca regresa una tabla.",
"time": "06:53",
"topic": "ADO + FWH + DBF + SQL",
"username": "R.F."
}
] |
ADO + FWH + DBF + SQL
|
[
{
"date": "2006-11-11",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Gracias por la ayuda, me podrían decir como veo los metodos y propiedades para trabajar con ADO en FHW?, \n\nGracias.\n\nAriel,",
"time": "01:01",
"topic": "ADO + FWH + DBF + SQL",
"username": "akeyser"
}
] |
ADO + FWH + DBF + SQL
|
[
{
"date": "2006-11-11",
"forum": "FiveWin para Harbour/xHarbour",
"text": "El siguiente link puede serte de gran ayuda \n\n[url:1n99odyj]http://www.aspfacil.com/articulos/040401.asp[/url:1n99odyj]\n\n\nUn saludo\n\nMarcelo Jingo",
"time": "21:19",
"topic": "ADO + FWH + DBF + SQL",
"username": "sjingo"
}
] |
ADO + FWH + DBF + SQL
|
[
{
"date": "2006-11-16",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Amiguinho\n\nUstedes podes visualizar en:\n\n[url=http://ns7.webmasters.com/caspdoc/html/ado_component_reference.htm:1x31ap2r]SunChilliSoft.ASP[/url:1x31ap2r]\n\nÉs mui simples usar ADO con Fivewin.",
"time": "00:11",
"topic": "ADO + FWH + DBF + SQL",
"username": "Rochinha"
}
] |
ADO + FWH + DBF + SQL
|
[
{
"date": "2006-12-09",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola,\nUna pregunta levanto un recordset con Ado usando la libreria de jlcapel y dependiendo la cantidad de campos que me retorne en el SELECT me da el error hb_xgrab(0) not allocate memory y tal vez son 20 campos, a alguien le paso ? y lo pudo solucionar.\nGracias.",
"time": "23:03",
"topic": "ADO + FWH + SQL SERVER",
"username": "Ariel"
}
] |
ADO + FWH + SQL SERVER
|
[
{
"date": "2005-11-24",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Foro buenos días, estoy probando ADO + MS-SQL y va muy bien, pero me he topado con un problema.\n\nEstoy haciento una consulta la cual me regresa un oRS con tres campos\nuno de tipo TinyInt y dos de tipo nVarChar pero recorrer el oRs para meter los datos en un Array este me marca este error \n\n\"OLE Error Value : Unknown error\", esto cuando intento tomar el valor con : nEmpresa:=oRs:Fields('InEmpNum'):Value\nInEmpNum es del tipo TinyInt, pero si cambio este campo a tipo Int\nel error ya no se presenta\n\nTengo que definir algo ?\n\nDe antemano mil gracias \nJoel Andujo",
"time": "18:32",
"topic": "ADO + MS-SQL",
"username": "Joel Andujo"
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-11-24",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Los campos TinyInt se utilizan para los campos lógicos ( .T. o .F. )",
"time": "20:07",
"topic": "ADO + MS-SQL",
"username": "jzamoras"
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-11-25",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Gracias Zamoras, lo curioso es es que pruebo con un campo tipo SmallInt\ny sucede lo mismo, no reconoce el tipo de dato. al leerlo con \nnEmpresa:=oRs:Fields('InEmpNum'):Value \nme marca \"OLE Error Value : Unknown error\"\n\nAl pareder la clase no reconoce los campos tipo Tinyint e SmallInt y ale busque y la verdad no se por donde van los tiros, alguien que ya este trabajando con OleDB, hechem un cable por favor.\n\nHay una versión mas actualizada de la clase Ole del Maestro Jóse Gimenez ?\n\nSaludo\nJoel Andujo",
"time": "23:52",
"topic": "ADO + MS-SQL",
"username": "Joel Andujo"
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-11-26",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Yo lo hago de la siguiente forma:\n\n[code:sb3re2eh]\n\n::TipoCampo( oQuery:Get( \"Type\" ) )\n\n\n//////\n//------------------------------------------------------------------------------------// METHOD TipoCampo( ) retorna el tipo de campo.\n//------------------------------------------------------------------------------------\nMETHOD TipoCampo( nTipo ) CLASS TConexion\n SWITCH nTipo //DO CASE\n CASE 202; CASE 130; CASE 200; CASE 129 // Carácter.\n RETURN \"C\"\n CASE 14; CASE 5; CASE 3; CASE 131; CASE 2; CASE 4 // Numérico.\n RETURN \"N\"\n CASE 7; CASE 133; CASE 135 // Fecha\n RETURN \"D\"\n CASE 11; CASE 16 // Lógico\n RETURN \"L\"\n CASE 203; CASE 11; CASE 128 // Campo memo\n RETURN \"M\"\n DEFAULT\n MsgInfo( \"Tipo de dato no válido: \" + STR( nTipo ) )\n END // SWITCH CASE\nRETURN NIL\n[/code:sb3re2eh]\n\nEspero que esto te ayude.Saludos.",
"time": "15:55",
"topic": "ADO + MS-SQL",
"username": "jzamoras"
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-11-27",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Acabo de revisar un ejemplo con SQL Server y con ADO y me esta regresando bien los valores.\n\n(x)Harbour 99.5 y FW 2.6",
"time": "23:22",
"topic": "ADO + MS-SQL",
"username": "R.F."
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-11-28",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Joel,\n\n[quote:3e98qt9c]\"OLE Error Value : Unknown error\", esto cuando intento tomar el valor con : nEmpresa:=oRs:Fields('InEmpNum'):Value\n[/quote:3e98qt9c]\n\nUsas ADO contra MySql... ¿Como? ¿ODBC? Si es Odbc, cual versión de MyOdbc usas?? ¿Cual versión de MySql? ¿y de ADO?\n\nSaludos,\nJosé Luis Capel",
"time": "19:35",
"topic": "ADO + MS-SQL",
"username": "jlcapel"
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-11-29",
"forum": "FiveWin para Harbour/xHarbour",
"text": "José Luis, estoy usando FWH 2.4 + Microsoft-SQL + ADO (TOleAuto del master José Gimenez)\n\nYa he trabajado con Odbc utilizando TOdbc() y va muy bien, pero ahora busco mejorar los tiempos usando ADO y me he topado con el problema que les comento.\n\nGracias a todos saludos \nJoel Andujo",
"time": "16:10",
"topic": "ADO + MS-SQL",
"username": "Joel Andujo"
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-11-30",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Joel,\n\nSi es la versión original de tOleAuto (y no la que viene actualmente con xharbour) es probable (y repito probable) que ahí radique el problema.\n\nIntenta bajarte los ultimos binarios de xhabour. Y, desde xharbour (son FWH) intenta hacer las mismas operaciones. Casi te puedo asegurar que no vas a tener ningún problema.\n\nYa me contarás como te fue.\n\nSaludos,\nJosé Luis Capel",
"time": "00:02",
"topic": "ADO + MS-SQL",
"username": "jlcapel"
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-12-01",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Gracias José Luis por ahi me voy a ir, de hecho tengo la inquietud desde hace algun tiempo de cambiarme a xHarbour y ahora con mas razón.\n\nYa te contaré como me fue\n\nSaludos\nJoel Andujo",
"time": "16:33",
"topic": "ADO + MS-SQL",
"username": "Joel Andujo"
}
] |
ADO + MS-SQL
|
[
{
"date": "2005-12-03",
"forum": "FiveWin para Harbour/xHarbour",
"text": "José Luis, exacto era eso!!!, despues de pegarme un tiro(buscarle, buscarle y volver a buscrale) recompilando FW24 y mis librerias de terceros con xHarbour 0.99.50 (SimPlex) de xHarbour.org ya el ejemplo de ADO me regresa los valores correctos. \n\nSaludos\nJoel Andujo",
"time": "18:10",
"topic": "ADO + MS-SQL",
"username": "Joel Andujo"
}
] |
ADO + MS-SQL
|
[
{
"date": "2010-11-17",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Tengo una duda y lo voy a ser sencillo a ver si por ahi resuelvo el quilombete.\n\n[code=fw:1d6gj5bn]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">FUNCTION</span> buscar<span style=\"color: #000000;\">(</span>cBuscar, oRs, oBrw<span style=\"color: #000000;\">)</span><br /> cBuscar = AllTrim<span style=\"color: #000000;\">(</span>cBuscar<span style=\"color: #000000;\">)</span><br /><br /> oRs:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <----------- ACA ESTA MI DUDA!<br /> <span style=\"color: #00C800;\">IF</span> !Empty<span style=\"color: #000000;\">(</span>cBuscar<span style=\"color: #000000;\">)</span><br /> oRs:<span style=\"color: #000000;\">find</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"nombre LIKE '%\"</span>+cBuscar+<span style=\"color: #ff0000;\">\"%'\"</span>,,<span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">ENDIF</span><br /><br /> <span style=\"color: #00C800;\">IF</span> !<span style=\"color: #000000;\">(</span>oRs:<span style=\"color: #000000;\">Eof</span> .or. ors:<span style=\"color: #000000;\">Bof</span><span style=\"color: #000000;\">)</span><br /> oBrw:<span style=\"color: #0000ff;\">refresh</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #000000;\">(</span><span style=\"color: #00C800;\">nil</span><span style=\"color: #000000;\">)</span><br /> </div>[/code:1d6gj5bn]\nIntuyo que el error del programa se debe a que primero lo mando al puntero al primer registro y luego lo hago buscar... no hay problema si lo encuentra. \nSi hay problema cuando no lo encuentra, para mi \" pierde\" la sincronizacion con los bookMark, al querer retornar al browser no sabe donde quedo y larga el dichoso error\n\n[quote:1d6gj5bn]Error description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: BOOKMARK\n Args:[/quote:1d6gj5bn]\n\nes esto asi? \n\nhe probado antes de hacer el movefirst() salvar el booMArk asi\n\n[code=fw:1d6gj5bn]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> <span style=\"color: #00C800;\">LOCAL</span> bBookMarkActual:= oBrw:<span style=\"color: #000000;\">bBookMark</span></div>[/code:1d6gj5bn]\n\ny luego restaurarlo asi:\n[code=fw:1d6gj5bn]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> <span style=\"color: #00C800;\">IF</span> !<span style=\"color: #000000;\">(</span>oRs:<span style=\"color: #000000;\">Eof</span> .or. ors:<span style=\"color: #000000;\">Bof</span><span style=\"color: #000000;\">)</span><br /> oBrw:<span style=\"color: #0000ff;\">refresh</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">ELSE</span><br /> oBrw:<span style=\"color: #000000;\">bBookMark</span>:= bBookMarkActual<br /> oBrw:<span style=\"color: #0000ff;\">refresh</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">ENDIF</span></div>[/code:1d6gj5bn]\n\npero sigue el error. \n\nQue solucion puede tener esto?\ngracias.",
"time": "23:09",
"topic": "ADO - Error description: Error ADODB.RecordSet/6 DIS",
"username": "goosfancito"
}
] |
ADO - Error description: Error ADODB.RecordSet/6 DIS
|
[
{
"date": "2010-11-17",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Siempre que hagas una búsqueda es obligatorio poner el RecodSet en el primer registro. oRs : MoveFirst()\nTe paso este enlace que está muy bueno \n<!-- m --><a class=\"postlink\" href=\"http://www.w3schools.com/ado/ado_ref_recordset.asp\">http://www.w3schools.com/ado/ado_ref_recordset.asp</a><!-- m -->\n\nSaludos",
"time": "23:45",
"topic": "ADO - Error description: Error ADODB.RecordSet/6 DIS",
"username": "horacio"
}
] |
ADO - Error description: Error ADODB.RecordSet/6 DIS
|
[
{
"date": "2010-11-18",
"forum": "FiveWin para Harbour/xHarbour",
"text": "entonces que le estoy h/errando?",
"time": "00:22",
"topic": "ADO - Error description: Error ADODB.RecordSet/6 DIS",
"username": "goosfancito"
}
] |
ADO - Error description: Error ADODB.RecordSet/6 DIS
|
[
{
"date": "2012-07-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi,\n\nIs is correct to say that if I download the connector\n<!-- m --><a class=\"postlink\" href=\"http://dev.mysql.com/downloads/connector/odbc/5.1.html\">http://dev.mysql.com/downloads/connector/odbc/5.1.html</a><!-- m -->\n\nand use MariaDB, I can use MySQL with xHarbour without buying any other server licence? Or do I need someting else?\n\nThanks,\nMarc",
"time": "08:59",
"topic": "ADO - SQL-question",
"username": "Marc Vanzegbroeck"
}
] |
ADO - SQL-question
|
[
{
"date": "2012-07-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Marc\n\nSQL Server Express is a free edition of SQL Server ideal for developing and powering desktop, web and small server applications.\n\n<!-- m --><a class=\"postlink\" href=\"http://www.microsoft.com/sqlserver/en/us/editions/2012-editions/express.aspx\">http://www.microsoft.com/sqlserver/en/u ... press.aspx</a><!-- m -->\n\nThe beauty of using Ms Sql server is that you can use ADO SqlOleDB which is loaded on every Microsoft computer .. you will not need to download any clients or worry about configuring ODBC.\n\nDeploy your app and use it from any Windows computer nothing else is needed.\n\nRick Lipkin",
"time": "15:28",
"topic": "ADO - SQL-question",
"username": "Rick Lipkin"
}
] |
ADO - SQL-question
|
[
{
"date": "2012-07-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Marc:\n\nIf you use MariaDb then you don't need MySql and viceversa, and yes !, you need the\nconnector to use MariaDB or MySql with ADO.\n\nI have a medium size app developed with ADO, xHarbour, FW and MySql, I made a test\nwith MariaDB and no change was necessary, all the code has been accepted.\n\nRegards",
"time": "17:13",
"topic": "ADO - SQL-question",
"username": "Armando"
}
] |
ADO - SQL-question
|
[
{
"date": "2012-07-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Rick Lipkin\":2v1qg84r]Marc\n\nSQL Server Express is a free edition of SQL Server ideal for developing and powering desktop, web and small server applications.\n\n<!-- m --><a class=\"postlink\" href=\"http://www.microsoft.com/sqlserver/en/us/editions/2012-editions/express.aspx\">http://www.microsoft.com/sqlserver/en/u ... press.aspx</a><!-- m -->\n\nThe beauty of using Ms Sql server is that you can use ADO SqlOleDB which is loaded on every Microsoft computer .. you will not need to download any clients or worry about configuring ODBC.\n\nDeploy your app and use it from any Windows computer nothing else is needed.\n\nRick Lipkin[/quote:2v1qg84r]\n\nRick,\n\nThanks, for the very useful information. Do you have an example how to connect to this server?\n\nRegards,\nMarc",
"time": "19:33",
"topic": "ADO - SQL-question",
"username": "Marc Vanzegbroeck"
}
] |
ADO - SQL-question
|
[
{
"date": "2012-07-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Armando\":3pao8n30]Marc:\n\nIf you use MariaDb then you don't need MySql and viceversa, and yes !, you need the\nconnector to use MariaDB or MySql with ADO.\n\nI have a medium size app developed with ADO, xHarbour, FW and MySql, I made a test\nwith MariaDB and no change was necessary, all the code has been accepted.\n\nRegards[/quote:3pao8n30]\n\nArmando,\n\nThank you for the information. Is the connector a free download, or is there a limitation? I thought once to have read on this forum that this was not free.\n\nRegards,\nMarc",
"time": "19:36",
"topic": "ADO - SQL-question",
"username": "Marc Vanzegbroeck"
}
] |
ADO - SQL-question
|
[
{
"date": "2012-07-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Marc:\n\nAs I know, the connector is free but MySql is Freeware, here is the link for mariaDB, perhaps is your best option.\n\n<!-- m --><a class=\"postlink\" href=\"http://mariadb.org/en/\">http://mariadb.org/en/</a><!-- m -->\n\nBest regards",
"time": "20:00",
"topic": "ADO - SQL-question",
"username": "Armando"
}
] |
ADO - SQL-question
|
[
{
"date": "2012-07-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Mark\n\nHere is a very simple example how to set up the Sql Server Connection and how to open a recordset.\n\nRick\n\n[code=fw:1urbxj2m]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br /><span style=\"color: #00C800;\">Local</span> oRsRepair,cSql,oErr<br /><span style=\"color: #00C800;\">Public</span> xConnect<br /><br />xPROVIDER := <span style=\"color: #ff0000;\">\"SQLOLEDB\"</span><br />xSOURCE := <span style=\"color: #ff0000;\">\"YOURSQLSERVERNAME\"</span> <br />xCATALOG := <span style=\"color: #ff0000;\">\"YOURDATABASENAME\"</span><br />xUSERID := <span style=\"color: #ff0000;\">\"user\"</span> <span style=\"color: #B900B9;\">// this username has to have permission</span><br />xPASSWORD := <span style=\"color: #ff0000;\">\"password\"</span> <span style=\"color: #B900B9;\">// to login to the database</span><br /><br />xCONNECT := <span style=\"color: #ff0000;\">'Provider='</span>+xPROVIDER+<span style=\"color: #ff0000;\">';Data Source='</span>+xSOURCE+<span style=\"color: #ff0000;\">';Initial Catalog='</span>+xCATALOG+<span style=\"color: #ff0000;\">';User Id='</span>+xUSERID+<span style=\"color: #ff0000;\">';Password='</span>+xPASSWORD<br /><br />cSql := <span style=\"color: #ff0000;\">\"Select * from YOURTABLE\"</span><br /><br />oRsRepair := TOleAuto<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">)</span><br />oRsRepair:<span style=\"color: #000000;\">CursorType</span> := <span style=\"color: #000000;\">1</span> <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsRepair:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// local cache</span><br />oRsRepair:<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 /> oRsRepair:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">(</span> cSQL,xCONNECT <span style=\"color: #000000;\">)</span><br />CATCH oErr<br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Error in Opening REPAIR table\"</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">(</span>.F.<span style=\"color: #000000;\">)</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br /><span style=\"color: #0000ff;\">xbrowse</span><span style=\"color: #000000;\">(</span> oRsRepair <span style=\"color: #000000;\">)</span><br /><br />oRsRepair:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> </div>[/code:1urbxj2m]",
"time": "22:10",
"topic": "ADO - SQL-question",
"username": "Rick Lipkin"
}
] |
ADO - SQL-question
|
[
{
"date": "2007-09-20",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola Foro:\n\nAlguien sabe como conocer cual es el valor del ultimo registro creado en un campo autonumerico de una tabla access 2000.\n\nLos campos autonumericos, son aquellos que el motor les asignan solo un valor numerico incremental, por lo general de 1 en 1.\n\nMi problema, es que necesito conocer el valor antes de grabar el recordset, pues es un dato mas de mi registro y no se cual es el que le asignará.\n\nAlguna idea ??\n\nSaludos\n\n[/b]",
"time": "21:51",
"topic": "ADO - consultar el ultimo registro ingresado en una tabla.",
"username": "jcaro"
}
] |
ADO - consultar el ultimo registro ingresado en una tabla.
|
[
{
"date": "2007-09-24",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Juan\n\noRs:Insert_ID( )\nRegresa el ultimo identificador de numeracion automatico insertado (serial). Regresa falso si la funcion no esta soportada.\n\nUn saludo\nMarcelo Jingo",
"time": "18:46",
"topic": "ADO - consultar el ultimo registro ingresado en una tabla.",
"username": "sjingo"
}
] |
ADO - consultar el ultimo registro ingresado en una tabla.
|
[
{
"date": "2007-09-24",
"forum": "FiveWin para Harbour/xHarbour",
"text": "[b:6hl4alk4] GRACIAS[/b:6hl4alk4] Marcelo, la voy a probar. \n\nNo conocia esa funcion.\n\nSaludos,",
"time": "19:31",
"topic": "ADO - consultar el ultimo registro ingresado en una tabla.",
"username": "jcaro"
}
] |
ADO - consultar el ultimo registro ingresado en una tabla.
|
[
{
"date": "2009-06-02",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola a todos,\n\nAlguien me podria explicar para q carajos sirve hacer un ::Clone() de un oRS. Vale, ya se q hace una copia referencial del oRS, pero q ventajas aporta y para y cuando se debe usar ? \n\n\nGracias.",
"time": "09:14",
"topic": "ADO -> Metodo Clone()",
"username": "Carles"
}
] |
ADO -> Metodo Clone()
|
[
{
"date": "2009-06-02",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Yo lo utilizo cuando estoy mostrando el recordset en un browse y quiero hacer otra operación con ese recordset. de esta manera cada recordset mantiene su posición. Esta es una, supongo que tendrá más utilidades. Saludos",
"time": "14:41",
"topic": "ADO -> Metodo Clone()",
"username": "horacio"
}
] |
ADO -> Metodo Clone()
|
[
{
"date": "2009-06-02",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Horacio,\n\nSi, ya he probado el tema de realizar busquedas o aplicar filtros. Realmente es mas rapido q volver a crear y ejecutar una nueva select. Entiendo que cualquier operacion que hagas es sobre el conjunto de datos seleccionados previamente con el RecordSet, o puedes realizar una nueva select ? (creo q he dicho una barbaridad...)\n\n\n\nSaludos.\nC.",
"time": "15:02",
"topic": "ADO -> Metodo Clone()",
"username": "Carles"
}
] |
ADO -> Metodo Clone()
|
[
{
"date": "2009-06-02",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Carles:\n\nUmmm, me parece que no has dicho una barbaridad, pues tambien puedes hacer un nuevo SELECT de la misma tabla aunque ya tengas uno creado.\n\nTe pongo un ejemplo donde puede aplicarse:\n\nSupongamos que ya tienes creado un record set de toda la tabla de clientes con el cual creas un browse, ahora imagina que deseas registrar un nuevo cliente, obviamente para no duplicar el cliente debes revisar que no este registrado ya, en una aplicación monousuario no habría mayor problema pues simplemente buscas en el recordset que tienes creado y listo peroooo, si es un ambiente multiusuario (que es lo más lógico) debes estar seguro que ningun otro usuario haya dado de alta el cliente que tu pretendes registrar, en este caso con buscar en el recordset no es suficiente.\n\nEl problema es que el record set no se auto refresca con los nuevos registros que otro usuario adicione, debes hacerlo tú por código oRs:Refresh(), bien en un timer para que te refresque l recordset cada n tiempo o bien buscarlo en la tabla origen y eso lo harías creando un nuevo recordset seleccionando solamente el cliente que pretendes registrar, si el recordset te queda vacio significa que nadie más lo ha registrado antes que tú.\n\nAqui estamos creando dos record sets desde una misma tabla.\n\nOjalá me haya explicado y esto sea la respuesta a tu pregunta.\n\nSaludos",
"time": "17:57",
"topic": "ADO -> Metodo Clone()",
"username": "Armando"
}
] |
ADO -> Metodo Clone()
|
[
{
"date": "2009-06-03",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Armando,\n\nGracias. He experimentado un poco y mi conclusion es: Nosotros creamos un RecordSet con seleccion de datos a gestionar. Con el :Clone(), podemos rapidamente disponer de un objeto referencia q nos permitira hacer busquedas, filtros, y manipulaciones de los datos clonados. El bookmark siempre es el mismo q el original. Podemos facilmente refrescar el clone si lo necesitamos. Y sobre el hecho de dar de altas, me parece q lo tengo mu claro. Si tengo una clave unica de codigo, manejo el gestor de errores y facilmente se si he actualizado o no. Si ya existe el registro, pues canta... \n\n[code=fw:1dacwzd2]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">TRY</span><br /> ::<span style=\"color: #000000;\">oRs</span>:<span style=\"color: #0000ff;\">Update</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> CATCH oError<br /><br /> <span style=\"color: #00C800;\">FOR</span> EACH oError IN oConn:<span style=\"color: #000000;\">Errors</span><br /> TAdoError<span style=\"color: #000000;\">(</span> oError <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br />END<br /> </div>[/code:1dacwzd2]",
"time": "08:58",
"topic": "ADO -> Metodo Clone()",
"username": "Carles"
}
] |
ADO -> Metodo Clone()
|
[
{
"date": "2009-04-16",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola,\n\nNo se si digo una tonteria, pero como puedo saber los registros que hay un recordset, una vez he reallizado el :Open() ?\n\n\nGracias.",
"time": "12:25",
"topic": "ADO -> Registros en un recordset",
"username": "Carles"
}
] |
ADO -> Registros en un recordset
|
[
{
"date": "2009-04-16",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Si la cadena es cCadenaRecordset := \"Select nombre, calle, numero from clientes\" una vez que obtengas el recordset lo puedes recorrer de la siguiente manera\nWhile( !oRecordSet : Eof() )\n ? oRecordSet : Fields( \"nombre\" ) : Value, oRecordSet : Fields( \"calle\" ) : Value, oRecordSet : Fields( \"numero\" ) : Value\n oRecordSet : MoveNext()\nEnddo\n\nEspero te sirva \nSaludos",
"time": "14:31",
"topic": "ADO -> Registros en un recordset",
"username": "horacio"
}
] |
ADO -> Registros en un recordset
|
[
{
"date": "2009-04-16",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola Horacio,\n\nGracias, pero yo quiero saber si existe alguna funcion, metodo, variables, ... sin tener q recorrerme todo el recordset <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n\n\nGracias.",
"time": "18:51",
"topic": "ADO -> Registros en un recordset",
"username": "Carles"
}
] |
ADO -> Registros en un recordset
|
[
{
"date": "2009-04-16",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Horacio, asi :\n\n? 'No. de Registros '+ str( oRs:Recordcount() )\n\nSaludos\nJoel Andujo",
"time": "19:38",
"topic": "ADO -> Registros en un recordset",
"username": "Joel Andujo"
}
] |
ADO -> Registros en un recordset
|
[
{
"date": "2009-04-16",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Joel,\n\nJoder gracias !!! -> A veces un arbol no te deja ver un bosque <!-- s:mrgreen: --><img src=\"{SMILIES_PATH}/icon_mrgreen.gif\" alt=\":mrgreen:\" title=\"Mr. Green\" /><!-- s:mrgreen: --> \n\nGracies.",
"time": "19:48",
"topic": "ADO -> Registros en un recordset",
"username": "Carles"
}
] |
ADO -> Registros en un recordset
|
[
{
"date": "2008-02-25",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I have to create a database in MS-Sql server automatically from my install program.\n\nIs it possible, using ADO, to issue direct native \"sql-string\" calls to a sql-server to create the following?\n- users\n- databases\n-schemas?",
"time": "17:27",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "don lowenstein"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2008-02-25",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I am doing with Oracle + ADO (users + schemas)",
"time": "18:15",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "Manuel Valdenebro"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2008-02-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Don\n\nGenerally I have to get our DBA's involved to set up a database for me and set up a userid for my connection.\n\nOnce that is done .. I control the application ( users ) thru tables .. Hopefully you will be given 'create' and 'drop' rights .. \n\nI have my own 2005 SQL server that I use as my development box .. and I control that and do everything I need with SQL Studio 2005.\n\nHope that helps .. I don't think you can create a database in a schima with scripts... \n\nRick",
"time": "02:23",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "Rick Lipkin"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2008-02-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Once a database is created, we can create tables, indexes, even procedures through ADO. Both on Oracle and MSSQL.\n\nOne way is by sending the create scripts as commands in execute method and another way is to use ADOX.\n\nIn any case the user logged in should have create permissions.\n\nI do not know if we can create database itself though ADO.",
"time": "07:27",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "nageswaragunupudi"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2008-02-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "It works for me on MS SQL server 2005\n[code:1fsdwoe8]\n#INCLUDE \"FIVEWIN.CH\"\n#INCLUDE \"xbrowse.CH\"\n\n//----------------------\nFunction main()\n\n LOCAL oRs1,oRs2,oRs3,oErr,cSQl1,cSql2, cSQL,cTitle,oBrw,oWnd\n\tmsgInfo(\"Start\")\n\tcSQL := \"create database jbc\"\n\tcSql1:=\t\"CREATE LOGIN jbc2 WITH PASSWORD = 'hhhh'; \";\n\t\t\t\t+\"USE jbc; \";\n\t\t\t\t+\"CREATE USER jbc2 FOR LOGIN jbc2 \"\n\tcSQl2\t:=\t\"CREATE SCHEMA jbc AUTHORIZATION jbc2 \";\n \t\t\t+\"CREATE TABLE test (source int, cost int, partnumber int) \";\n \t\t\t+\"GRANT SELECT TO jbc2 \"\n oRs1 := TOleAuto():New( \"ADODB.Recordset\" )\n oRs1:CursorType := 1 // opendkeyset\n oRs1:CursorLocation := 3 // local cache\n oRs1:LockType := 3 // lockoportunistic\n TRY\n \toRS1:Open( cSql,'Provider=SQLOLEDB;Data Source=OGNEW;Initial Catalog=;User Id=sa1;Password=qqqe' )\n \tCATCH oErr\n \tMsgInfo( \"Error in creating database\" )\n \tRETURN(.F.)\n\tEND TRY\n oRs3 := TOleAuto():New( \"ADODB.Recordset\" )\n oRs3:CursorType := 1 // opendkeyset\n oRs3:CursorLocation := 3 // local cache\n oRs3:LockType := 3 // lockoportunistic\n TRY\n \toRs3:Open( cSql1,'Provider=SQLOLEDB;Data Source=OGNEW;Initial Catalog=;User Id=sa1;Password=qqqe' )\n \tCATCH oErr\n \tMsgInfo( \"Error in creating user\" )\n \tRETURN(.F.)\n\tEND TRY\n\t\n oRs2 := TOleAuto():New( \"ADODB.Recordset\" )\n oRs2:CursorType := 1 // opendkeyset\n oRs2:CursorLocation := 3 // local cache\n oRs2:LockType := 3 // lockoportunistic\n \n TRY\n \toRs2:Open( cSql2,'Provider=SQLOLEDB;Data Source=OGNEW;Initial Catalog=jbc;User Id=sa1;Password=qqqe' )\n \tCATCH oErr\n \tMsgInfo( \"Error in crating table\" )\n \tRETURN(.F.)\n\tEND TRY\nReturn nil\n[/code:1fsdwoe8]\n\nThat scripts generate database, user and schema\n\nregards Eugeniusz",
"time": "10:38",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "Eugeniusz Owsiak"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2008-02-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Mr Eugeniusz Owsiak\n\nThanks for the info.",
"time": "14:07",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "nageswaragunupudi"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2008-02-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I will try the test for creating databases provided by Mr Owsiak. This may be just what I was looking for.\n\nI would like to deliver our applications to clients with complete seamlessness for end users. Many of our end users are not very computer savy.\n\nMS-Sql server is becoming quite popular and dependable and many small businesses (banks in my case). These clients are leary of .dbf files and want the MS-Sql database. Most of these clients don't have a DBA.\n\nThis is very useful for me - I want to deliver a solution as seamless as when I did it with .dbf files. I would package the sql-server engine with our distribution CD and build/maintain the databases 100% within code. \n\nMost likely, I would be the only one ever using the Visual Studio / Enterprise Manager for actual administration of the end databases. Most of my users want to be insulated from these tasks.\n\nThanks again to all who replied.",
"time": "15:06",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "don lowenstein"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2008-02-29",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Eugeniusz, \n\nI wanted to take a moment to thank you for your examples of creating a MS-SQL database, login, user, and schema. Your examples were very helpful, and your response is greatly appreciated. \n\nI did modularize the calls to allow calling each create individually. Also for flexibility, we capture the varaibles(sa password, database name, login...) via a dialog. \n\nOne other modification I made is adding an execute to change the login/user to a \"db_owner\" as follows:\n\nMDB is the DataBase name from the dialog\nMLOGIN is the MS-SQL Login from the dialog\ncUSER is the DataBase User from the dialog\n\nLOCAL cSQLCdbu := \"USE \" + MDB + \"; \" ;\n +\"CREATE USER \"+cUSER+\" FOR LOGIN \"+MLOGIN+ \"; \" ;\n +\"EXEC sp_addrolemember 'db_owner', '\" +cUSER+\"'\"\n\nWe certainly appreciate your assistance. \n\nRegards, \nPerry Nichols",
"time": "16:33",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "Perry Nichols"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2008-03-01",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Mr Lowenstain\nYou can also from management studio\n1. make setup of database, users, logins schemas etc \n2. creating backap to file, \n3. copying backap file to your didrtibution media \n4.restoring database with this script: \n[code:33j6weqd]\n\n#INCLUDE \"FIVEWIN.CH\"\n\n//----------------------\nFunction main()\n\n LOCAL oRs1,oErr,cSQL\n\tmsgInfo(\"Start\")\n\n\tcSQL:=\"RESTORE DATABASE jbc \";\n \t+\"FROM DISK = 'c:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\Backup\\jbc.bak' \"\n\n oRs1 := TOleAuto():New( \"ADODB.Recordset\" )\n oRs1:CursorType := 1 // opendkeyset\n oRs1:CursorLocation := 3 // local cache\n oRs1:LockType := 3 // lockoportunistic\n TRY\n \toRS1:Open( cSql,'Provider=SQLOLEDB;Data Source=OGNEW;Initial Catalog=;User Id=sa1;Password='qqqe' )\n \tCATCH oErr\n \tMsgInfo( \"Error in restoring database\" )\n\tEND TRY\nReturn nil\n[/code:33j6weqd]\nThis is easiest way to solve your problem\n\nregards Eugeniusz",
"time": "12:31",
"topic": "ADO -ms-sql - xharb 1.0 - create database user schema?",
"username": "Eugeniusz Owsiak"
}
] |
ADO -ms-sql - xharb 1.0 - create database user schema?
|
[
{
"date": "2007-05-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "To All\n\nI have done several Google searches and not been able to find how to write a blank or null date to a datetime field in MS Sql server using ADO recordset update. Consider this example:\n\n|DATE |\n| null |\n\n\n dDATE := oRs:Fields(\"DATE\"):Value // xHarbour sees a NULL date as NIL\n\nwriting back a blank date\n\noRs:Fields( \"DATE\" ):Value := IF( EMPTY( dDATE ), NIL, dDATE )\n\nThis works .. however it puts a DEFAULT date of 12/30/1899 in for the NIL parameter and writes that to the table. I need to be able to let a user blank out a date and store it as BLANK or NULL in the SQL table .. ctod(\"\") gives an ADO run-time if you try to write that value to the MS SQL table.\n\nAny ideas ??\n\nRick Lipkin\nSC Dept of Health, USA",
"time": "01:17",
"topic": "ADO .. how to write ctod('00/00/00') to MS Sql Server",
"username": "Rick Lipkin"
}
] |
ADO .. how to write ctod('00/00/00') to MS Sql Server
|
[
{
"date": "2007-05-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Fernando\n\nI am writing the same program in pure ADO and in ADORDD .. I have not tested the capability of writing rdd back to the table .. and I will do that .. MS SQL seems to be different in quite a few many ways as Access or MySql .. I have put my adordd program on hold for the time being because adordd uses indexes for seeks .. and MS Sql does not support seeks on indexes .. \n\nI will test rdd on writing back ctod(\"00/00/00\") to the table and report back here.\n\nThanks\nRick Lipkin",
"time": "13:25",
"topic": "ADO .. how to write ctod('00/00/00') to MS Sql Server",
"username": "Rick Lipkin"
}
] |
ADO .. how to write ctod('00/00/00') to MS Sql Server
|
[
{
"date": "2007-05-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "To All .. the FIX \n\nHere is some 'snipits' of my xHarbour thread with Jose Gimenez who has fixed the problem and is available in binary from his site or on CVS.\n\nRick Lipkin\nSC Dept of Health, USA\n\n//----------------------------\n\nRick,\n\n> This works .. however it puts a DEFAULT date of 12/30/1899 in for the NIL \n> parameter and writes that to the table. I need to be able to let a user \n> blank out a date and store it as BLANK or NULL in the SQL table .. \n> ctod(\"\") gives an ADO run-time if you try to write that value to the MS \n> SQL table.\n\nThis was fixed last Feb, 16th, but last official binaries from xHarbour are \nolder, so you have to update from CVS. Now, writing a ctod(\"\") value results in a real NULL date.\n\n//--------------------------------------------\n\nThe change is very simple:\n\n- search the function hb_oleItemToVariant() in \n\\xharbour\\source\\rtl\\win32ole.prg\n- search the case HB_IT_DATE: in the switch sentence\n- change the first line:\n\n if( bByRef )\n into:\n if( pItem->item.asDate.value == 0 )\n {\n pVariant->n1.n2.vt = VT_NULL;\n }\n else if( bByRef )\n\nThat's all <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) -->",
"time": "00:57",
"topic": "ADO .. how to write ctod('00/00/00') to MS Sql Server",
"username": "Rick Lipkin"
}
] |
ADO .. how to write ctod('00/00/00') to MS Sql Server
|
[
{
"date": "2023-08-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "hi,\n\ni \"read\" *.XLSx using ADO to display in XBROWSE\nthat \"sems\" to work ... so far\n\nbut LEN of ALL FIELDs are \"maximum\" LEN <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> \n\n---\n\ndoes Function FWAdoStruct(objRS) work only on \"active\" Record <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: --> \n\nusing FWAdoStruct(objRS, .T.) i got e.g.\n[quote:2exrriu4]{CHINAART, C, 255, 0, 202, .T., 255, 0, 255, 255}[/quote:2exrriu4]\n8th Element Type \"C\" is 0 while in DBF FIELD is EMPTY() in 1st Record\n\n---\n\nany Idea what i can do ... <!-- s:idea: --><img src=\"{SMILIES_PATH}/icon_idea.gif\" alt=\":idea:\" title=\"Idea\" /><!-- s:idea: -->",
"time": "05:01",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "Jimmy"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2023-08-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "That is the issue with ADO with Excel.\nWhatever length you specify while creating the table, that is ignored.\nADO RecordSet field object always shows oField:DefinedSize as 255.",
"time": "11:32",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "nageswaragunupudi"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2023-08-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote:3rit79qs]does Function FWAdoStruct(objRS) work only on \"active\" Record <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->\n[/quote:3rit79qs]\nIt should work on both existing and blank records, but let me check again.\n\nPlease post a DBF Structure here so that we both work on the same structure",
"time": "11:36",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "nageswaragunupudi"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2023-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "hi,\n[quote=\"nageswaragunupudi\":34lzt3bv]That is the issue with ADO with Excel.[/quote:34lzt3bv]\nok, understand",
"time": "04:33",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "Jimmy"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2023-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"nageswaragunupudi\":1vdqkomm][quote:1vdqkomm]does Function FWAdoStruct(objRS) work only on \"active\" Record <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->\n[/quote:1vdqkomm]Please post a DBF Structure here so that we both work on the same structure[/quote:1vdqkomm]\n[code=fw:1vdqkomm]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">Local</span> aStruct := <span style=\"color: #000000;\">{</span> ;<br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"TEST_C\"</span> ,<span style=\"color: #ff0000;\">\"C\"</span> , <span style=\"color: #000000;\">10</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span> ,;<br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"TEST_N\"</span> ,<span style=\"color: #ff0000;\">\"N\"</span> , <span style=\"color: #000000;\">10</span>, <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">}</span> ,;<br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"TEST_D\"</span> ,<span style=\"color: #ff0000;\">\"D\"</span> , <span style=\"color: #000000;\">8</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span> ,; <br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"TEST_L\"</span> ,<span style=\"color: #ff0000;\">\"L\"</span> , <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <br /> <br />DbCreate<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"TESTTYPE.DBF\"</span>, aStruct, <span style=\"color: #ff0000;\">\"FOXCDX\"</span> <span style=\"color: #000000;\">)</span></div>[/code:1vdqkomm]\n\n---\n\n[code=fw:1vdqkomm]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">cQuery = <span style=\"color: #ff0000;\">\"CREATE TABLE testtype ( TEST_C TEXT ( 10) , TEST_N DOUBLE , TEST_D DATE , TEST_L BIT )\"</span> <br /> </div>[/code:1vdqkomm]\n[quote:1vdqkomm]var2char( aStruct ) = \n\"{{TEST_C, C, 255, 0, 202, .T., 255, 12, 255, 255}, \n{TEST_N, N, 17, 2, 5, .T., 8, 8, 15, 255}, \n{TEST_D, D, 8, 0, 7, .T., 8, 8, 255, 255}, \n{TEST_L, L, 1, 0, 11, .T., 2, 2, 255, 255}}\"[/quote:1vdqkomm]\n\n[code=fw:1vdqkomm]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">cQuery = <span style=\"color: #ff0000;\">\"CREATE TABLE testtype ( TEST_C TEXT ( 10) , TEST_N NUMBER , TEST_D DATE , TEST_L LOGICAL )\"</span> <br /> </div>[/code:1vdqkomm]\n[quote:1vdqkomm]var2char( aStruct ) = \n\"{{TEST_C, C, 255, 0, 202, .T., 255, 12, 255, 255}, \n{TEST_N, N, 17, 2, 5, .T., 8, 8, 15, 255}, \n{TEST_D, D, 8, 0, 7, .T., 8, 8, 255, 255}, \n{TEST_L, L, 1, 0, 11, .T., 2, 2, 255, 255}}\"\t[/quote:1vdqkomm]",
"time": "04:49",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "Jimmy"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2023-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "FWAdoStruct() gets the information from each field object of the RecordSet.\nThe issue with ADO for Excel is, whatever length of char we specify it always returns 255.\noField:DefinedSize.\n\nPlease try this:\n[code=fw:r5paqw7q]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> n := <span style=\"color: #000000;\">0</span><br /> aFields := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">do</span> <span style=\"color: #00C800;\">while</span> n < oRs:<span style=\"color: #000000;\">Fields</span>:<span style=\"color: #0000ff;\">Count</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> WITH OBJECT oRs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span><br /> AAdd<span style=\"color: #000000;\">(</span> aFields, <span style=\"color: #000000;\">{</span> :<span style=\"color: #0000ff;\">Name</span>, :<span style=\"color: #000000;\">Value</span>, :<span style=\"color: #000000;\">Type</span>, :<span style=\"color: #000000;\">DefinedSize</span>, :<span style=\"color: #000000;\">ActualSize</span>, :<span style=\"color: #000000;\">Precision</span>, :<span style=\"color: #000000;\">NumericScale</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">)</span><br /> END<br /> <span style=\"color: #00C800;\">enddo</span><br /> XBROWSER aFields<br /> </div>[/code:r5paqw7q]\nWhatever FWAdoStruct() shows is what ADO informs us.",
"time": "05:44",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "nageswaragunupudi"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2023-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "hi,\n\ni have found this\n\n[quote:15kfqx2v]You need ADOX to do it.\n\nThis is how you would create the excel file\n\n[code=fw:15kfqx2v]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">Dim cat As ADOX.Catalog<br />Dim tbl As ADOX.Table<br />Dim col As ADOX.Column<br /><br />Set cat = <span style=\"color: #00C800;\">New</span> ADOX.Catalog<br /><br />cat.ActiveConnection = <span style=\"color: #ff0000;\">\"Provider=Microsoft.Jet.OLEDB.4.0;\"</span> & <span style=\"color: #ff0000;\">\"Data Source=\"</span><br />& myfile & <span style=\"color: #ff0000;\">\";Extended Properties=Excel 8.0\"</span><br />Set tbl = <span style=\"color: #00C800;\">New</span> ADOX.Table<br />tbl.<span style=\"color: #0000ff;\">Name</span> = <span style=\"color: #ff0000;\">\"Sample\"</span><br /><br /><span style=\"color: #ff0000;\">'do this for each column in the table<br />Set col = New ADOX.Column<br />With col<br />.Name = \"myTipe\"<br />.Type = adVarWChar<br />.DefinedSize = 80<br />End With<br />tbl.Columns.Append col</span></div>[/code:15kfqx2v]\n....\nYou can then open the file with ADO to write your info\n[/quote:15kfqx2v]\n\nother Sample\n\n[quote:15kfqx2v][code=fw:15kfqx2v]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">Sub Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #0000ff;\">On</span> Error GoTo CreateAutoIncrColumnError<br /><br />Dim cnn As <span style=\"color: #00C800;\">New</span> ADODB.Connection<br />Dim cat As <span style=\"color: #00C800;\">New</span> ADOX.Catalog<br />Dim tbl As <span style=\"color: #00C800;\">New</span> ADOX.Table<br /><br />cnn.Open <span style=\"color: #ff0000;\">\"Provider=Microsoft.Jet.OLEDB.4.0;\"</span> & <span style=\"color: #ff0000;\">\"Data Source=\"</span> & <span style=\"color: #ff0000;\">\"C:<span style=\"color: #000000;\">\\T</span>est.XLS\"</span> & <span style=\"color: #ff0000;\">\";Extended Properties=Excel 8.0\"</span> Set cat.ActiveConnection = cnn<br /><br />With tbl<br />.<span style=\"color: #0000ff;\">Name</span> = <span style=\"color: #ff0000;\">\"MyContacts\"</span><br />Set .ParentCatalog = cat<br /><span style=\"color: #ff0000;\">' Create fields and append them to the new Table object.<br />.Columns.Append \"ContactId\", adInteger<br />'</span> Make the ContactId column and auto incrementing column<br />.Columns<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ContactId\"</span><span style=\"color: #000000;\">)</span>.Properties<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"AutoIncrement\"</span><span style=\"color: #000000;\">)</span> = <span style=\"color: #00C800;\">True</span><br />.Columns.Append <span style=\"color: #ff0000;\">\"CustomerID\"</span>, adVarWChar<br />.Columns.Append <span style=\"color: #ff0000;\">\"FirstName\"</span>, adVarWChar<br />.Columns.Append <span style=\"color: #ff0000;\">\"LastName\"</span>, adVarWChar<br />.Columns.Append <span style=\"color: #ff0000;\">\"Phone\"</span>, adVarWChar, <span style=\"color: #000000;\">20</span><br />.Columns.Append <span style=\"color: #ff0000;\">\"Notes\"</span>, adLongVarWChar<br />End With<br /><br />cat.Tables.Append tbl<br /><br /><br />cnn.Close<br />Set cat = Nothing<br />Set tbl = Nothing<br />Set cnn = Nothing<br />Exit Sub<br /><br />CreateAutoIncrColumnError:<br /><br /><span style=\"color: #000000;\">Set</span> cat = Nothing<br />Set tbl = Nothing<br /><br /><span style=\"color: #00C800;\">If</span> Not cnn Is Nothing Then<br /><span style=\"color: #00C800;\">If</span> cnn.State = adStateOpen Then cnn.Close<br />End <span style=\"color: #00C800;\">If</span><br />Set cnn = Nothing<br /><br /><span style=\"color: #00C800;\">If</span> Err <span style=\"color: #000000;\">0</span> Then<br />MsgBox Err.Source & <span style=\"color: #ff0000;\">\"-->\"</span> & Err.Description, , <span style=\"color: #ff0000;\">\"Error\"</span><br />End <span style=\"color: #00C800;\">If</span><br /><br />End Sub</div>[/code:15kfqx2v]\n\n100% working. (just need a correct file/path.) +\nAdd Ref : (Menu Tools - Réf)\nMicrosoft ADO +\nMicrosoft ADO Ext [/quote:15kfqx2v]\nit is for Excel 8 so i need to change \"Provider\" String which is no Problem\n\nbut how to handle \"Set cat = New ...\" <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->",
"time": "05:53",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "Jimmy"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2023-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "hi,\n\ni have ask ChatGPT and got this\n[code=fw:2cn8sr60]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">FUNCTION</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> cat, tbl, col<br /> cat := AdoxCreateObject<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADOX.Catalog\"</span><span style=\"color: #000000;\">)</span><br /> tbl := AdoxCreateObject<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADOX.Table\"</span><span style=\"color: #000000;\">)</span><br /> col := AdoxCreateObject<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADOX.Column\"</span><span style=\"color: #000000;\">)</span><br /> <br /> cat:<span style=\"color: #000000;\">ActiveConnection</span> := <span style=\"color: #ff0000;\">\"Provider=Microsoft.ACE.OLEDB.12.0;\"</span> + <span style=\"color: #ff0000;\">\"Data Source=\"</span> + myfile + <span style=\"color: #ff0000;\">\";Extended Properties='Excel 12.0 Xml;HDR=YES;'\"</span><br /> <br /> tbl:<span style=\"color: #0000ff;\">Name</span> := <span style=\"color: #ff0000;\">\"Sample\"</span><br /> <br /> col:<span style=\"color: #0000ff;\">Name</span> := <span style=\"color: #ff0000;\">\"Header1\"</span><br /> col:<span style=\"color: #000000;\">Type</span> := adVarWChar<br /> col:<span style=\"color: #000000;\">DefinedSize</span> := <span style=\"color: #000000;\">255</span><br /> tbl:<span style=\"color: #000000;\">Columns</span>:<span style=\"color: #000000;\">Append</span><span style=\"color: #000000;\">(</span>col<span style=\"color: #000000;\">)</span><br /> <br /> col:<span style=\"color: #0000ff;\">Name</span> := <span style=\"color: #ff0000;\">\"Header2\"</span><br /> col:<span style=\"color: #000000;\">Type</span> := adDouble<br /> tbl:<span style=\"color: #000000;\">Columns</span>:<span style=\"color: #000000;\">Append</span><span style=\"color: #000000;\">(</span>col<span style=\"color: #000000;\">)</span><br /> <br /> col:<span style=\"color: #0000ff;\">Name</span> := <span style=\"color: #ff0000;\">\"Header3\"</span><br /> col:<span style=\"color: #000000;\">Type</span> := adDate<br /> tbl:<span style=\"color: #000000;\">Columns</span>:<span style=\"color: #000000;\">Append</span><span style=\"color: #000000;\">(</span>col<span style=\"color: #000000;\">)</span><br /> <br /> col:<span style=\"color: #0000ff;\">Name</span> := <span style=\"color: #ff0000;\">\"Header4\"</span><br /> col:<span style=\"color: #000000;\">Type</span> := adBoolean<br /> tbl:<span style=\"color: #000000;\">Columns</span>:<span style=\"color: #000000;\">Append</span><span style=\"color: #000000;\">(</span>col<span style=\"color: #000000;\">)</span><br /> <br /> cat:<span style=\"color: #000000;\">Tables</span>:<span style=\"color: #000000;\">Append</span><span style=\"color: #000000;\">(</span>tbl<span style=\"color: #000000;\">)</span><br /> <br /> <span style=\"color: #00C800;\">LOCAL</span> conn, rs<br /> conn := HbCreateObject<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADODB.Connection\"</span><span style=\"color: #000000;\">)</span><br /> rs := HbCreateObject<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span><span style=\"color: #000000;\">)</span><br /> <br /> conn:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">(</span>cat:<span style=\"color: #000000;\">ActiveConnection</span><span style=\"color: #000000;\">)</span><br /> rs:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"SELECT * FROM [Sample]\"</span>, conn, <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">)</span><br /> <br /> rs:<span style=\"color: #000000;\">AddNew</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> rs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Value</span> := <span style=\"color: #ff0000;\">\"Text Data\"</span><br /> rs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Value</span> := <span style=\"color: #000000;\">123.45</span><br /> rs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Value</span> := DATE<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">2023</span>, <span style=\"color: #000000;\">8</span>, <span style=\"color: #000000;\">14</span><span style=\"color: #000000;\">)</span><br /> rs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Value</span> := .T.<br /> rs:<span style=\"color: #0000ff;\">Update</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <br /> rs:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> conn:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <br /> cat:<span style=\"color: #000000;\">Tables</span>:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> cat:<span style=\"color: #000000;\">Tables</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"Sample\"</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Columns</span>.<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <br /> cat:<span style=\"color: #000000;\">Save</span><span style=\"color: #000000;\">(</span>cat:<span style=\"color: #000000;\">ActiveConnection</span><span style=\"color: #000000;\">)</span><br /> <br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br />PROCEDURE AdoxCreateObject<span style=\"color: #000000;\">(</span>cObjectName<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> oADOX<br /> oADOX := HbCreateObject<span style=\"color: #000000;\">(</span>cObjectName<span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">RETURN</span> oADOX</div>[/code:2cn8sr60]\nthis CODE is not \"perfect\" but give me a Idea what to do <!-- s:idea: --><img src=\"{SMILIES_PATH}/icon_idea.gif\" alt=\":idea:\" title=\"Idea\" /><!-- s:idea: --> \n\n---\n\nQuestion : if i use adVar[size=150:2cn8sr60]W[/size:2cn8sr60]Char instead of adVarChar is the same FIELD LEN <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->",
"time": "08:17",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "Jimmy"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2023-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Yes, we can use ADOX also.",
"time": "08:17",
"topic": "ADO / Excel / XBROWSE / FWAdoStruct() / Edit()",
"username": "nageswaragunupudi"
}
] |
ADO / Excel / XBROWSE / FWAdoStruct() / Edit()
|
[
{
"date": "2008-06-25",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Como se puede trabajar ADO con MYSQL con wbrowse con tablas vacias\r\n\r\nSAludos",
"time": "20:23",
"topic": "ADO /MYSQL con WBROWSE",
"username": "jbrita"
}
] |
ADO /MYSQL con WBROWSE
|
[
{
"date": "2008-06-26",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Pues consistemciandolo \r\n\r\n\r\n ::oDatos:=CreateObject(\"adodb.Recordset\")\r\n ::oDatos:CursorLocation := 2 //3 //adUseServer //adUseClient\r\n ::oDatos:LockType := 3 // adLockOptimistic\r\n ::oDatos:CursorType := 1 // adOpenKeyset\r\n ::oDatos:Source:=cStatement\r\n ::oDatos:ActiveConnection:=::oConnect\r\n ::oDatos:Open()\r\n ::cSelect := cStatement\r\n\r\nEste dato ponlo como if dentro del bline \r\n ::oDatos:Fields:Count()",
"time": "03:08",
"topic": "ADO /MYSQL con WBROWSE",
"username": "Vladimir Zorrilla"
}
] |
ADO /MYSQL con WBROWSE
|
[
{
"date": "2008-06-26",
"forum": "FiveWin para Harbour/xHarbour",
"text": "perdon es este metodo\r\n\r\nolbx:bLine:={ || if(::oDatos:RecordCount()=0,array( elem),",
"time": "03:11",
"topic": "ADO /MYSQL con WBROWSE",
"username": "Vladimir Zorrilla"
}
] |
ADO /MYSQL con WBROWSE
|
[
{
"date": "2016-09-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello ,\n\nWorking with ADO i am trying to understand field definitions as : \n\nCREATE TABLE TestTable ( ID COUNTER PRIMARY KEY ,\n[FIELD2] CHAR(20) NOT NULL DEFAULT 'Fivewin power' ,\n[FIELD3] NUMERIC(10,0) DEFAULT 0 )\n\n[code=fw:2mzi6sp8]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /> oRS:<span style=\"color: #000000;\">AddNew</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> a := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">1</span>,<span style=\"color: #00C800;\">nil</span>,<span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> oRs:<span style=\"color: #000000;\">Fields</span>:<span style=\"color: #0000ff;\">count</span><br /> WITH OBJECT oRs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span>i<span style=\"color: #000000;\">-1</span><span style=\"color: #000000;\">)</span><br /> ? :<span style=\"color: #000000;\">Value</span> == <span style=\"color: #00C800;\">nil</span> <span style=\"color: #B900B9;\">// Give 3 times .T. , value from each field seems to be nil</span><br /> <span style=\"color: #00C800;\">try</span><br /> :<span style=\"color: #000000;\">Value</span> = a<span style=\"color: #000000;\">[</span> i <span style=\"color: #000000;\">]</span><br /> catch <br /> ? <span style=\"color: #ff0000;\">\" Error on field \"</span> + :<span style=\"color: #0000ff;\">Name</span> , a<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><br /> end <br /> END<br /> <span style=\"color: #00C800;\">NEXT</span><br /> oRs:<span style=\"color: #0000ff;\">Update</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> oRs:<span style=\"color: #000000;\">Fields</span>:<span style=\"color: #0000ff;\">count</span><br /> WITH OBJECT oRs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span>i<span style=\"color: #000000;\">-1</span><span style=\"color: #000000;\">)</span><br /> ? :<span style=\"color: #000000;\">Value</span> , :<span style=\"color: #000000;\">Value</span> == <span style=\"color: #00C800;\">nil</span> , VALTYPE<span style=\"color: #000000;\">(</span>:<span style=\"color: #000000;\">Value</span><span style=\"color: #000000;\">)</span> <br /> END<br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> </div>[/code:2mzi6sp8]\n\n1) Default value has no effect. I expected the value from the second field to be 'fivewin power'\n2) Second field has clause NOT NULL , but value nil is accepted. \n The field has now a value SPACE(20) , same result with Clause NULL\n3) Third field ? :Value --> 0.00 , expected 0 , maybe configuration from the aplication (SET DECIMALS)\n Exact value can be retrieved using oField:Precision\nIt seems that on this way the clauses (NOT) NULL and DEFAULT have no effect.\nCan this clauses be retrieved from ADO ? If not they are useless in the fivewin aplication.\n\nFrank",
"time": "09:31",
"topic": "ADO : Building columns , NULL ... DEFAULT",
"username": "Franklin Demont"
}
] |
ADO : Building columns , NULL ... DEFAULT
|
[
{
"date": "2016-09-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Assigning nil is equivalent to assigning NULL.\nWhen we assign NULL, server does not use Default value. Server thinks that we wanted the value to be NULL overriding the default value.\n\nSo it is desirable to assign DEFAULT. This can be done either by omitting the assignment in SQL statement of specifically assigining DEFAULT.\n\nNow, how do we do it in ADO. Instead of using NIL, use AdoDefault(). \nAdoDefault() and AdoNull() are functions provided by FWH for this purpose.",
"time": "14:12",
"topic": "ADO : Building columns , NULL ... DEFAULT",
"username": "nageswaragunupudi"
}
] |
ADO : Building columns , NULL ... DEFAULT
|
[
{
"date": "2016-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rao ,\n\nI am not sure that you answered the question .\n\nBuilding the table with \nCREATE TABLE TestTable ( ID COUNTER PRIMARY KEY ,\n[FIELD2] CHAR(20) NOT NULL DEFAULT 'Fivewin power' , ... )\n ....\n\noRs:AddNew()\n\nFIELD2 must become the value \"Fivewin power\" .\n\nWill Ors:Fields(\"FIELD2\"):Value := AdoDefault() do so ?\nor does it the same as AdoNull() ? \n\nThis function is not present in FWH1404.\n( I don't use FWH for comercial purposes , ony to make a new version from FWHDBU) \n\nI found this two functions in ADORDD.PRG from 08.12.2015 , but adonull gives a nil value , adodefault a error\n\nHow can give Adodefault this Defaultvalue ? How can it read this value from the ors or connection class ?\n\nFrank",
"time": "13:40",
"topic": "ADO : Building columns , NULL ... DEFAULT",
"username": "Franklin Demont"
}
] |
ADO : Building columns , NULL ... DEFAULT
|
[
{
"date": "2016-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Frank\n\nI am not familiar with \"Default\" .. I am a bit old fashioned and like to write out my code without taking too many shortcuts .. understand Rao has created some VERY nice Ado wrappers and can simplify the code below .. however, Consider this example:\n[code=fw:3ekvvz93]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">// Assuming you have a connection to the database oCn</span><br /><br /><span style=\"color: #B900B9;\">// easier to read if you code the Create Table this way</span><br /><br />cSql := <span style=\"color: #ff0000;\">\"CREATE TABLE [TestTable] \"</span><br />cSql += <span style=\"color: #ff0000;\">\"( \"</span><br />cSql += <span style=\"color: #ff0000;\">\"[Id] COUNTER NOT NULL, \"</span><br />cSql += <span style=\"color: #ff0000;\">\"[Field2] char(20) NULL, \"</span><br />cSql += <span style=\"color: #ff0000;\">\"CONSTRAINT PK_TESTTABLE PRIMARY KEY ( ID )\"</span><br />cSql += <span style=\"color: #ff0000;\">\" )\"</span><br /><br /><span style=\"color: #00C800;\">Try</span><br /> oCn:<span style=\"color: #000000;\">Execute</span><span style=\"color: #000000;\">(</span> cSQL <span style=\"color: #000000;\">)</span><br />Catch<br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Create Table TESTTABLE Failed\"</span> <span style=\"color: #000000;\">)</span><br /> oCn:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">(</span>.f.<span style=\"color: #000000;\">)</span><br />End <span style=\"color: #00C800;\">try</span><br /><br />oRs := TOleAuto<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">)</span><br />oRs:<span style=\"color: #000000;\">CursorType</span> := <span style=\"color: #000000;\">1</span> <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRs:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// local cache</span><br />oRs:<span style=\"color: #000000;\">LockType</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br />cSQL := <span style=\"color: #ff0000;\">\"SELECT * from [TestTable]\"</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br /> oRS:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">(</span>cSQL,oCn <span style=\"color: #000000;\">)</span><br />CATCH oErr<br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Error in Opening TESTTABLE table\"</span> <span style=\"color: #000000;\">)</span><br /> oCn:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">(</span>.F.<span style=\"color: #000000;\">)</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br />oRs:<span style=\"color: #000000;\">AddNew</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />oRs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"Field2\"</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Value</span> := <span style=\"color: #ff0000;\">\"Fivewin power\"</span><br />oRs:<span style=\"color: #0000ff;\">Update</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br />oRs:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />oCn:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">(</span>.t.<span style=\"color: #000000;\">)</span><br /> </div>[/code:3ekvvz93]\n\nRick Lipkin",
"time": "15:38",
"topic": "ADO : Building columns , NULL ... DEFAULT",
"username": "Rick Lipkin"
}
] |
ADO : Building columns , NULL ... DEFAULT
|
[
{
"date": "2016-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rick\n\nHe is writing a generic DBU.\nHow does he know what value to be assigned?\n[quote:336nykb8]\noRs:Fields(\"Field2\"):Value := \"Fivewin power\"\n[/quote:336nykb8]\nHow does he know that the default value is \"Fivewin power\" ?\nThat is the question he is asking.",
"time": "15:42",
"topic": "ADO : Building columns , NULL ... DEFAULT",
"username": "nageswaragunupudi"
}
] |
ADO : Building columns , NULL ... DEFAULT
|
[
{
"date": "2016-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rao ,\n\nADO has not the possibility to retrieve the Default value ? Wright ?\n\nIt is not difficult to build DBU , writing the Default values in an ini-file when the table is created with DBU.\n\nBut opening an ADO file , created outside DBU , the default value can't be retrieved (i suppose)\n\nFrank",
"time": "16:39",
"topic": "ADO : Building columns , NULL ... DEFAULT",
"username": "Franklin Demont"
}
] |
ADO : Building columns , NULL ... DEFAULT
|
[
{
"date": "2016-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "ADO does not retrieve default values.\n\nADO converts all Save()s into INSERT or UPDATE SQL statements and executes on the server. Assigning a NULL value also over-rides default. Through SQL, the ways to write default values are (1) do not specify a value for the field or (2) specify DEFAULT as value for the field.\n\nEg:\nINSERT INTO TestTable ( [field1], [field2] ) VALUES ( somevalue, DEFAULT )\n\nor \n\nINSERT INTO TestTable( [field1] ) VALUES ( somevalue ) // We do not list ID and field2 here\n\nNow how to do this with ADO?\nWe have seen that assigning a value of NIL and saving is equivalent to specify NULL in the INSERT sql statement. So default value is not used.\n\nSo, \noRs:AddNew()\nAssign fields with nil or some value\noRs:Save()\n\ndoes not work.\n\nOnly way is:\n\noRs:AddNew( aFields, aValues ) // oRs:Save() is not required for this usage\nwithout including autoinc and default value fields in the list (array)\n\nEg: oRs:AddNew( { \"field1\" }, { 24 } ) // 24 is some value. We did not include ID and FIELD2 in this list.\nThis writes correctly to the database assiging \"Fivewin power\" to FIELD2 and also autoincrementing ID.\n\nStill our client does not know what are the values written,\nWe need to re-read the values written with\neither\noRs:ReSync( 1, 2 )\nor\noRs:Requery()\n\nUnfortunately Resync() does not work perfectly with all databases. Works perfectly with MSSQL\nand Requery() is slow but works in all cases\n\nTested just now. Adodefault() is not working. \nAs to the code we can always share with you wherever necessary. But this is not working here.\nMay I know are you developing in Harbour or xHarbour?",
"time": "17:32",
"topic": "ADO : Building columns , NULL ... DEFAULT",
"username": "nageswaragunupudi"
}
] |
ADO : Building columns , NULL ... DEFAULT
|
[
{
"date": "2016-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote:2npqwgm0]It is not difficult to build DBU , writing the Default values in an ini-file when the table is created with DBU.\n[/quote:2npqwgm0]\nAssigning default values explicitly is not proper. This is the job of the server and we should let the server do it.\nThe way is to use AdoNew( <fields>, <values> )",
"time": "17:37",
"topic": "ADO : Building columns , NULL ... DEFAULT",
"username": "nageswaragunupudi"
}
] |
ADO : Building columns , NULL ... DEFAULT
|
[
{
"date": "2007-09-14",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Un saludo a todos los colegas del Foro\n\nEstoy largo rato intentando encontrar la solución a este problema y me doy por vencido. \n\nHe implementado un BROWSE en el cual se dan las típicas opciones de Modificar, Adicionar y Eliminar Registros, usando los métodos del objeto Recordset de ADO. Funciona Muy bien cuando se trabaja con una sola estación (estacion1); pero cuando desde estacion2 se realiza algún cambio, adición o eliminación, estos no se reflejan en el Browse de estacion1. Entonces si por ejemploi el usuario de estacion1 trata de eliminar lo que estacion2 ya eliminó se produce el consiguiente error devuelto por el proveedor OLEDB.\n\nLa localización del Cursor está definido del lado del cliente \noRs:CursorLocation = adUseClient\n\nEl Objeto se abre usando estos parámetros\noRs:Open( cQuery , cConnection, adOpenKeyset, adLockOptimistic )\n\nincluso he probado usando adOpenDynamic, que según los manuales permiten ver todo tipo de cambios de otros usuarios, pero nada.\n\nHe tratado de probar usando las propiedades OriginalValue y UnderlyingValue (valor que tiene en la base de datos) pero los valores que se obtiene son los mismos que tiene el recordset en ese momento, no permitiéndome controlar el valor actual en la base de datos y el valor actual en el recordset local. \n\nCómo podría refrescar el BROWSE de estacion1 con los nuevos cambios ocurridos en El Servidor de Base de Datos y que lo realizó estacion2?\n\nPienso que si uso Requery() cada momento que me muevo por cada elemento del Browse, en una tabla grande y en internet se volvería muy lenta y el moverme sería un caos, porque en el requery se recargan los datos y el cursor siempre va a la ultima fila.\n\nUna opción que se me ocurre es capturar los mensajes de error del proveedor OLEDB y en base a estos actuar recargando los nuevos datos. Pero esta parte es la que no se como hacerlo aún. Cómo hago con Harbour para capturar los errores de ADO?\n\nEspero que alguien pueda darme alguna pista o si ya lo tiene resuelto me indique cómo controlar esos cambios.\n\nDesde ya muy agradecido\n\nMarcelo Jingo",
"time": "05:57",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "sjingo"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-14",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Marcelo,\n\nPara conseguir un 'browse' a lo xBase debes tener en cuenta:\n\na. Que el proveedor que utilizas sea capaz de manejar cursores dinámicos.\n\nb. Que abras un recordset cliente y dinámico.\n\nNo obstante lo anterior, abrir un recordset de esas características, cuando hay varios terminales 'atacando' al mismo 'browse' puede que el servidor se atasque.\n\nSi necesitas más información puedes mirar la ayuda de ADO y tambien puedes echar un vistazo a este artículo [url:3o7znfs4]http://www.capelblog.com/?p=58[/url:3o7znfs4]",
"time": "20:28",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "jlcapel"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-15",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Gracias por tu interés José Luis.\n\nSeguiré buscando la forma..., creo que en este punto voy a tener que hacer consultas SQL independientes usando el objeto command para comparar entre el valor actual del field del recordset y el que me entregue la consulta.... seguiré probando\n\n\nUn saludo\n\nMarcelo Jingo",
"time": "05:33",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "sjingo"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-16",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Marcelo,\n\n[quote:darcis7y]Seguiré buscando la forma..., creo que en este punto voy a tener que hacer consultas SQL independientes usando el objeto command para comparar entre el valor actual del field del recordset y el que me entregue la consulta.... seguiré probando [/quote:darcis7y]\n\nQuizás no te he entendido bien...\n\n¿Te refieres a tener un recordset con actualización dinámica o te refieres a la actualización de una fila?",
"time": "18:01",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "jlcapel"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-17",
"forum": "FiveWin para Harbour/xHarbour",
"text": "José Luis,\n\nComo dije, si un solo usuario se conecta al Servidor de Base de Datos(MySQL), no hay problema, el browse del recordset trabaja muy bien realizando actualizaciones, altas o eliminando registros, usando sus respectivos métodos, cuyas modificaciones se reflejan inmediátamente en el Servidor.\n\nPero si 2 o más usuarios usan el mismo recordset y uno de ellos por ejemplo elimina un registro, este cambio no se refleja en el browse del otro usuario, pudiendo este último (que aún lo ve en su browse) tratar de eliminar el que ya no existe en la Base de Datos, haciendo que se genere un error. \n\nLo más fácil sería colocar un botón que ejecute el método Requery, y que el usuario lo ejecutaría cada vez que vaya a realizar un cambio y así tenga la versión más actual de los datos. Pero esto no me parece muy práctico. \n\nEs por eso que yo me inclinaba por el lado de capturar los Errores del Proveedor de OLEDB, para que sólo cuando se genere el error mostrar el mensaje respectivo, y luego hacer un requery o regenerar todo el recordsete. \n\nPor eso va mi pedido a quienes puedan ayudarme y guiarme en este asunto.\n\nDe antemano muchas gracias\nSaludos\n\nMarcelo Jingo",
"time": "18:31",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "sjingo"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-17",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Amigo y por que no simplemente colocas un timer() para que refresque el browse, creo que esto soluciona tu problema.\n\nUn Saludos\n\nLEANDRO ALFONSO",
"time": "22:45",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "leandro"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-17",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Saludos Leandro\n\nSi no puedo capturar los errores desde Harbour, probaré pasándome a xHarbour que allí sí creo que se puede capturarlos usando TRY CATCH END. Si eso no funciona trataré de utilizar el TIMER que me recomiendas. Lo que se intenta es que la aplicación consuma menos recursos tanto del equipo como e la red.\n\nSeguiré con mis pruebas y ya les comentaré. Gracias Leandro\n\nMarcelo Jingo",
"time": "23:34",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "sjingo"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-18",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Es necesario un timer\n\ncuando se usa un browse para monitorear los datos,\n\n activate dialog oDlg centered on init ( mitimerOn() )\n\nstatic function MiTimerOn()\n DEFINE TIMER oTimer of oDlg INTERVAL 5000 ACTION TimerAction()\n activate timer oTimer\nreturn",
"time": "00:05",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "sysctrl2"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-18",
"forum": "FiveWin para Harbour/xHarbour",
"text": "César y Leandro\n\nHe probado colocando el timer, en efecto funciona ..... peeero, sucede lo que ya esperaba, que apenas si estoy navegando por el browse, este se va a la primera fila, cada intervalo que se ha definido el timer. impidiendo una navegación limpia.\n\nCreo que tendré que implementar un control más riguroso en el recordest, como guardar el número de fila actual y al refrescar volver a la fila gusadada y............ más cosas.\n\nDe todas formas gracias por todo y seguiré probando, es más ya me pasé a xHarbour para probar el control de errores con TRY CATCH.\n\nUn Saludo\n\nMarcelo Jingo",
"time": "03:38",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "sjingo"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-18",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Marcelo,\n\n¿Puedes mostrarnos cómo creas el recordset?\n¿Contra cual base de datos?\n¿Cual proveedor usas?",
"time": "20:39",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "jlcapel"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2007-09-19",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Gracias José Luis, César y Leandro.\n\nCon el apoyo de todos ya lo he solucionado y me funciona perfecto. La solución fue colocar el timer y controlando los posibles errores que podemos encontrar en la navegación.\n\nGracias de nuevo.\n\nMarcelo Jingo",
"time": "02:30",
"topic": "ADO : Entorno Multiusuario, Ayuda (Solucionado)",
"username": "sjingo"
}
] |
ADO : Entorno Multiusuario, Ayuda (Solucionado)
|
[
{
"date": "2016-11-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello ,\n\nI used to work with ADO (mdb-files) , till last month no problems.\n\nSince then i can't changed data in a mdb-file , i.e.\n(see also <!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33115\">viewtopic.php?f=3&t=33115</a><!-- l -->)\n[code=fw:2xs7mikh]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />oRs := TOleAuto<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">)</span><br />oRs:<span style=\"color: #000000;\">CursorType</span> := <span style=\"color: #000000;\">1</span> <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRs:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// local cache</span><br />oRs:<span style=\"color: #000000;\">LockType</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// lockoptimistic</span><br /> <br /><span style=\"color: #00C800;\">try</span><br /> oRs:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"SELECT * FROM \"</span> + cTable, oCon <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// Password=\"abc\" )</span><br />catch oError<br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> oError:<span style=\"color: #000000;\">Description</span> <span style=\"color: #000000;\">)</span><br />end<br />? oRs:<span style=\"color: #000000;\">CursorType</span> , oRs:<span style=\"color: #000000;\">CursorLocation</span> , oRs:<span style=\"color: #000000;\">LockType</span> <span style=\"color: #B900B9;\">// 3,3,3 !!!!!</span><br /><span style=\"color: #B900B9;\">// Is it normal that cursortype is changed in 3 ? </span><br /><br />DBG oRs <span style=\"color: #B900B9;\">// Shows correct</span><br /><br />oRs:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />oRs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ROW2\"</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Value</span> := <span style=\"color: #ff0000;\">\"Test\"</span><br />oRs:<span style=\"color: #0000ff;\">Update</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <= ERROR , due <span style=\"color: #0000ff;\">to</span> previous line<br /> </div>[/code:2xs7mikh] \n\nError description: (DOS Error -2147352567) WINOLE/1007 Kan de bij te werken rij niet vinden. Sommige waarden zijn mogelijk veranderd sinds de rij voor het laatst is gelezen. (0x80040E38): Microsoft Cursor Engine\n\n(Can not fint row to work on. Some values can be changed after the row was read)\n\n\nAlso when i try to use older versions from fivedbu i get this error. The most recent doesn't generate a error but doesn't changed the data\n\nI suppose something has changed in the environnement , but i have no idea to restore it.\n\nIs there a key in regedit ? Maybe a download ?\n\nFrank",
"time": "10:23",
"topic": "ADO : doesn't work anymore",
"username": "Franklin Demont"
}
] |
ADO : doesn't work anymore
|
[
{
"date": "2016-11-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Franklin\n\nsee this post :\n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=26102&start=15\">viewtopic.php?f=3&t=26102&start=15</a><!-- l -->\n\nRick Lipkin",
"time": "22:07",
"topic": "ADO : doesn't work anymore",
"username": "Rick Lipkin"
}
] |
ADO : doesn't work anymore
|
[
{
"date": "2016-11-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote:1toj9ef4]\n? oRs:CursorType , oRs:CursorLocation , oRs:LockType // 3,3,3 !!!!!\n// Is it normal that cursortype is changed in 3 ? \n[/quote:1toj9ef4]\n\nAlways and at all times, a client side record-set is opened with cursor-type adOpenStatic only, whatever cursortype we specify while opening the recordset. In other words, it is just useless and meaningless for us to specify a cursor type while openining a recordset with cursorlocation adUseClient.\n\nThis has been the behavior since ADO was created. There is nothing surprising or unusual about it.\n\nAgain, it is not that ADO was made like that. It is because with all RDBMSs, all client side cursors are static cursors.\n\nExceptions are (1) ADS and (2) one table at a time per one connection of MSSQL.",
"time": "01:49",
"topic": "ADO : doesn't work anymore",
"username": "nageswaragunupudi"
}
] |
ADO : doesn't work anymore
|
[
{
"date": "2007-08-01",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola a todos del foro\n\nDisculpen mi ignorancia, pero quiero saber Que es ADO, para que sirve, en que se utiliza.\n\nEs que quiero migrar mis sistemas a Cliente/Servidor.\n\nSalu2\n\nFrancis",
"time": "18:04",
"topic": "ADO ???",
"username": "Francis"
}
] |
ADO ???
|
[
{
"date": "2007-08-01",
"forum": "FiveWin para Harbour/xHarbour",
"text": "<!-- m --><a class=\"postlink\" href=\"http://es.wikipedia.org/wiki/ActiveX_Data_Objects\">http://es.wikipedia.org/wiki/ActiveX_Data_Objects</a><!-- m -->",
"time": "21:35",
"topic": "ADO ???",
"username": "Antonio Linares"
}
] |
ADO ???
|
[
{
"date": "2016-07-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi,\n\nIn my 32bit version I use this code to update a query, and stay on the same record.\n[code=fw:gwgrw5gv]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">vrec := oRs:<span style=\"color: #000000;\">AbsolutePosition</span><br />oRs:<span style=\"color: #000000;\">Requery</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />oRs:<span style=\"color: #000000;\">AbsolutePosition</span><span style=\"color: #000000;\">(</span>vrec<span style=\"color: #000000;\">)</span></div>[/code:gwgrw5gv]\nand is working fine.\n\nIn the 64bit-version I receive an error on the 3the line where I set the position again.\nvrec is holding the line-number, just like in the 32bit version. I debugged it, and is the value of the record, just like in the 32-bit version. \n[code=fw:gwgrw5gv]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">Error description: <span style=\"color: #000000;\"><span style=\"color: #000000;\">(</span>DOS</span> Error <span style=\"color: #000000;\">-2147352562</span><span style=\"color: #000000;\">)</span> WINOLE/<span style=\"color: #000000;\">1007</span> Argument error: <span style=\"color: #000000;\">ABSOLUTEPOSITION</span><br />Args:<br /> <span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">]</span> = N <span style=\"color: #000000;\">2</span></div>[/code:gwgrw5gv]\nIs there another way to do this?",
"time": "11:12",
"topic": "ADO AbsolutePosition in 64bit problem",
"username": "Marc Vanzegbroeck"
}
] |
ADO AbsolutePosition in 64bit problem
|
[
{
"date": "2016-07-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Marc\n\nYou can always do this the brute force way by saving your primary key to a variable and then requery and go back and find .. \n\n[code=fw:24e6phhp]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">Local</span> nPrimKey<br /><br />nPrimKey := oRs:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"<your nPrim key>\"</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Value</span><br />oRs:<span style=\"color: #000000;\">ReQuery</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br />oRs:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />oRs:<span style=\"color: #000000;\">Find</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"<your nPrim key> = \"</span>+ltrim<span style=\"color: #000000;\">(</span>str<span style=\"color: #000000;\">(</span>nPrimKey<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> </div>[/code:24e6phhp]\n\nMay not be pretty, but it should work..\n\nRick Lipkin",
"time": "14:19",
"topic": "ADO AbsolutePosition in 64bit problem",
"username": "Rick Lipkin"
}
] |
ADO AbsolutePosition in 64bit problem
|
[
{
"date": "2016-07-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi,\n\nI found the solution. <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n[code=fw:1fwbxd9x]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oRs:<span style=\"color: #000000;\">AbsolutePosition</span> := vrec</div>[/code:1fwbxd9x]\nis working\nStrange that in the other release [code=fw:1fwbxd9x]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oRs:<span style=\"color: #000000;\">AbsolutePosition</span><span style=\"color: #000000;\">(</span>vrec<span style=\"color: #000000;\">)</span></div>[/code:1fwbxd9x] also works <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: -->",
"time": "14:55",
"topic": "ADO AbsolutePosition in 64bit problem",
"username": "Marc Vanzegbroeck"
}
] |
ADO AbsolutePosition in 64bit problem
|
[
{
"date": "2016-07-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Marc\n\nI like your solution much better and more elegant. Thanks for the feedback!\n\nRick Lipkin",
"time": "15:15",
"topic": "ADO AbsolutePosition in 64bit problem",
"username": "Rick Lipkin"
}
] |
ADO AbsolutePosition in 64bit problem
|
[
{
"date": "2016-07-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Marc Vanzegbroeck\":229g19la]Hi,\n\nI found the solution. <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n[code=fw:229g19la]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oRs:<span style=\"color: #000000;\">AbsolutePosition</span> := vrec</div>[/code:229g19la]\nis working\nStrange that in the other release [code=fw:229g19la]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oRs:<span style=\"color: #000000;\">AbsolutePosition</span><span style=\"color: #000000;\">(</span>vrec<span style=\"color: #000000;\">)</span></div>[/code:229g19la] also works <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: -->[/quote:229g19la]\n\nAbsolutePosition isn't a method so the assignment is the correct way.\n\nEMG",
"time": "15:55",
"topic": "ADO AbsolutePosition in 64bit problem",
"username": "Enrico Maria Giordano"
}
] |
ADO AbsolutePosition in 64bit problem
|
[
{
"date": "2016-07-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I'm not certain which class is in use in this case, but looking at the source to TArrData and TRecSet I see that AbsolutePosition is an access value, and AbsolutePosition() is an assignment method. Give this I would expect oRS:AbsolutePosition := N to fail.\n\n---------- TARRDATA.PRG\n ACCESS AbsolutePosition INLINE ::nAt\n ASSIGN AbsolutePosition( x ) INLINE ::nAt := x\n\n---------- TRECSET.PRG\n ACCESS AbsolutePosition INLINE If( ::Empty, 0, ::oRs:AbsolutePosition )\n ASSIGN AbsolutePosition( n ) ;\n INLINE If( ::Empty, nil, ::oRs:AbsolutePosition := ::rs_FitRange( n ) )",
"time": "18:25",
"topic": "ADO AbsolutePosition in 64bit problem",
"username": "rhlawek"
}
] |
ADO AbsolutePosition in 64bit problem
|
[
{
"date": "2016-07-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "AbsolutePosition is a property not a method. Please look at the MS docs:\n\n[url:9zcaq4ao]https://msdn.microsoft.com/en-us/library/ms676594(v=vs.85).aspx[/url:9zcaq4ao]\n\nEMG",
"time": "18:41",
"topic": "ADO AbsolutePosition in 64bit problem",
"username": "Enrico Maria Giordano"
}
] |
ADO AbsolutePosition in 64bit problem
|
[
{
"date": "2007-06-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "To All\n\nI am running a roadblock and need to be able to store a recno to an array of 10 records. The only way I know how to update a record was to store the record number of the table in an element. WHen I go update the rows .. I just goto nRecno and Update my variables.\n\nI do not have a problem getting a \"suedo\" record number with :\n\n nRec := oRs:AbsolutePosition // -- get recno()\n oRs:AbsolutePosition := nRec // -- goto nRecno\n\nHowever since a recordset is not exactically a static commodity .. what are the pros and cons of using the above logic in moving between ( suedo ) records ??\n\nUnforunitly .. creating a unique sequence id per record is not an option.\n\nThanks\nRick Lipkin\nSC Dept of Health, USA",
"time": "00:43",
"topic": "ADO Absoluteposition",
"username": "Rick Lipkin"
}
] |
ADO Absoluteposition
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.