DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS

#1 Post by unixkd »

Dear Roger/All

DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS.

See below.
DCBROWSE-EDIT-ERROR.png
DCBROWSE-EDIT-ERROR.png (55.87 KiB) Viewed 11000 times

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS

#2 Post by rdonnay »

Cell editing was never tested with SQLEXPRESS.

Try putting a code block in the DEFAULT clause.

What build of eXpress++ are you using?
The eXpress train is coming - and it has more cars.

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS

#3 Post by unixkd »

Version build 261

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS

#4 Post by unixkd »

Anybody with the idea to make DCBROWSE ... EDIT WORK WITH SQLEXPRESS

Joe

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS

#5 Post by unixkd »

Now I got it working perfectly

Thanks ALL

Joe

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS

#6 Post by rdonnay »

We share our solutions with you.

How about sharing your solution with us?
The eXpress train is coming - and it has more cars.

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: DCBROWSE ... EDIT DOES NOT WORK WITH SQLEXPRESS

#7 Post by unixkd »

OK.

1. I use SQLdataset instead of SQLSelect

2. I have

FUNCTION SQLGetSetBlock( oCursor, nField , lCommit)
Local bPutData := {|o,x,lSave|o:fieldPut(nField,IF(ValType(x)=="C",Trim(x),x) ), IF(lSave,o:Commit(),Nil)}
Local oCol, nLen, nDec, xRet
DEFAULT lCommit := .t.
oCol := oCursor:getSQLColumn(nField)
nLen := oCol:length
IF oCol:ValType == "C"
xRet := {|x|if(x==NIL,PadR(oCursor:fieldGet(nField),nLen), Eval(bPutData,oCursor,x,lCommit))}
ELSE
xRet := {|x|if(x==NIL,oCursor:fieldGet(nField), Eval(bPutData,oCursor,x,lCommit))}
ENDIF
RETURN xRet

One More Problem: I discover that DCBROWSECOL ... EDITOR is not saving to table e.g.

DCBROWSECOL DATA SQLGetSetBlock(oCursor, "SellingPrice") HEADER "Selling Price" WIDTH 17 EVAL {|o|o:ColorBlock := bColor} EDITOR "SELLING_PRICE" PICTURE AMT_PIC EDITPROTECT {||!oCursor:FieldGet("AllowPost")}

@ Nil,Nil DCGET xNIL PICTURE AMT_PIC POPUP {|n| DC_PopCalc(n)} GETFONT "8.Courier.Bold.Italic" GETID "SELLING_PRICE"

Post Reply