Jeff (sorry my english is very bad)
So add record
First, if you database contain a primary key. you have update this field
Your example
suppose that primary key name is "CODE"
#include "FiveWin.ch"
#include "ADORDD.ch"
REQUEST ADORDD
Function Main()
USE Fusion VIA "ADORDD" TABLE "patients" MYSQL FROM "127.0.0.1" USER "fusion" PASSWORD "fusion" ALIAS "Patients"
go bottom
ncode:=Patients->code //primary key
Patients->DBAPPEND())
Patients->FIELDPUT(fieldpos("CODE "), ncode)) //primary key
Patients->FIELDPUT(fieldpos("Last "), "xxxxxxxxxxx"))
BROWSE()
USE
return nil
About the error " to many recursive error I can't say anything, it always shows when you have any error. see this example
Function Main()
msginfo(hola) //error ok variable not exist => error.log
USE Fusion VIA "ADORDD" TABLE "patients" MYSQL FROM "127.0.0.1" USER "fusion" PASSWORD "fusion" ALIAS "Patients"
go bottom
BROWSE()
USE
return nil
Function Main()
USE Fusion VIA "ADORDD" TABLE "patients" MYSQL FROM "127.0.0.1" USER "fusion" PASSWORD "fusion" ALIAS "Patients"
msginfo(hola) //bad error "too many recursive..
go bottom
BROWSE()
USE
return nil
I don´t not why
MySql and AdoRdd
Re: MySql and AdrRdd
SORRY
TO ADD RECORDS
function Main()
USE Fusion VIA "ADORDD" TABLE "patients" MYSQL FROM "127.0.0.1" USER "fusion" PASSWORD "fusion" ALIAS "Patients"
go bottom
ncode:=Patients->code +1//primary key, IF YOU HAVE ANY PROBLEM USE DATABASE SORT BY PRIMARY KEY
Patients->DBAPPEND())
Patients->FIELDPUT(fieldpos("CODE "), ncode)) //primary key
Patients->FIELDPUT(fieldpos("Last "), "xxxxxxxxxxx"))
BROWSE()
USE
return nil
TO MODIFY RECORDS
function Main()
USE Fusion VIA "ADORDD" TABLE "patients" MYSQL FROM "127.0.0.1" USER "fusion" PASSWORD "fusion" ALIAS "Patients"
ncode:=Patients->code//primary key
Patients->DBAPPEND())
Patients->FIELDPUT(fieldpos("CODE "), ncode)) //primary key
Patients->FIELDPUT(fieldpos("Last "), "xxxxxxxxxxx"))
BROWSE()
USE
return nil
TO ADD RECORDS
function Main()
USE Fusion VIA "ADORDD" TABLE "patients" MYSQL FROM "127.0.0.1" USER "fusion" PASSWORD "fusion" ALIAS "Patients"
go bottom
ncode:=Patients->code +1//primary key, IF YOU HAVE ANY PROBLEM USE DATABASE SORT BY PRIMARY KEY
Patients->DBAPPEND())
Patients->FIELDPUT(fieldpos("CODE "), ncode)) //primary key
Patients->FIELDPUT(fieldpos("Last "), "xxxxxxxxxxx"))
BROWSE()
USE
return nil
TO MODIFY RECORDS
function Main()
USE Fusion VIA "ADORDD" TABLE "patients" MYSQL FROM "127.0.0.1" USER "fusion" PASSWORD "fusion" ALIAS "Patients"
ncode:=Patients->code//primary key
Patients->DBAPPEND())
Patients->FIELDPUT(fieldpos("CODE "), ncode)) //primary key
Patients->FIELDPUT(fieldpos("Last "), "xxxxxxxxxxx"))
BROWSE()
USE
return nil
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Re: MySql and AdrRdd
Hi JARO,
It still crashed at:
Patients->DBAPPEND()
It still crashed at:
Patients->DBAPPEND()
Thanks,
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Re: MySql and AdoRdd
Anybody know how to do an Append via AdoRdd ?
Anyway I can mix Adordd and Ado just to get somethnig working?
I tried adding this to my app but failed at oRecordSet:Update():
Anyway I can mix Adordd and Ado just to get somethnig working?
I tried adding this to my app but failed at oRecordSet:Update():
Code: Select all
function APPENDADO()
local nWA := Select()
local oRecordSet := USRRDD_AREADATA( nWA )[ WA_RECORDSET ]
oRecordSet:AddNew()
oRecordSet:Update()
return nil
Thanks,
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MySql and AdoRdd
Mr Jeff
For me both replace and dbappend are working perfectly with ADORDD. I am using the latest adordd.prg from xharbour.org. Please make sure you have the latest. If you can email me at nageswaragunupudi@gmail.com, I can send the prg file I am using. In my view you should not get into any of these problems with ADORDD.
You can intermix both ADO and ADORDD.
Personally I prefer and advise using ADO directly, because we are fully aware of what is going on in our program. It is really very simple.
For me both replace and dbappend are working perfectly with ADORDD. I am using the latest adordd.prg from xharbour.org. Please make sure you have the latest. If you can email me at nageswaragunupudi@gmail.com, I can send the prg file I am using. In my view you should not get into any of these problems with ADORDD.
You can intermix both ADO and ADORDD.
Personally I prefer and advise using ADO directly, because we are fully aware of what is going on in our program. It is really very simple.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India