Click here to Skip to main content
15,919,358 members
Home / Discussions / Database
   

Database

 
QuestionDistinct records on old school foxpro database file Pin
jkirkerx15-Jun-14 12:22
professionaljkirkerx15-Jun-14 12:22 
AnswerRe: Distinct records on old school foxpro database file Pin
GuyThiebaut15-Jun-14 22:03
professionalGuyThiebaut15-Jun-14 22:03 
GeneralRe: Distinct records on old school foxpro database file Pin
jkirkerx16-Jun-14 6:08
professionaljkirkerx16-Jun-14 6:08 
AnswerRe: Distinct records on old school foxpro database file Pin
Jörgen Andersson15-Jun-14 22:27
professionalJörgen Andersson15-Jun-14 22:27 
GeneralRe: Distinct records on old school foxpro database file Pin
jkirkerx16-Jun-14 6:11
professionaljkirkerx16-Jun-14 6:11 
AnswerRe: Distinct records on old school foxpro database file Pin
NitinDhapte16-Jun-14 23:30
NitinDhapte16-Jun-14 23:30 
Answer[SOLVED], I finally go it Pin
jkirkerx19-Jun-14 18:42
professionaljkirkerx19-Jun-14 18:42 
QuestionUnable to establish a connection to sql database 2005 Pin
Otekpo Emmanuel14-Jun-14 11:57
Otekpo Emmanuel14-Jun-14 11:57 
AnswerRe: Unable to establish a connection to sql database 2005 Pin
Kornfeld Eliyahu Peter14-Jun-14 19:22
professionalKornfeld Eliyahu Peter14-Jun-14 19:22 
QuestionSelective queries? Pin
Member 448708313-Jun-14 7:00
Member 448708313-Jun-14 7:00 
GeneralRe: Selective queries? Pin
Richard MacCutchan13-Jun-14 7:16
mveRichard MacCutchan13-Jun-14 7:16 
AnswerRe: Selective queries? Pin
PIEBALDconsult13-Jun-14 7:19
mvePIEBALDconsult13-Jun-14 7:19 
AnswerRe: Selective queries? Pin
Tim Carmichael13-Jun-14 7:35
Tim Carmichael13-Jun-14 7:35 
AnswerRe: Selective queries? Pin
Eddy Vluggen13-Jun-14 7:47
professionalEddy Vluggen13-Jun-14 7:47 
GeneralRe: Selective queries? Pin
Member 448708313-Jun-14 10:26
Member 448708313-Jun-14 10:26 
AnswerRe: Selective queries? Pin
jschell13-Jun-14 8:32
jschell13-Jun-14 8:32 
GeneralRe: Selective queries? Pin
Member 448708313-Jun-14 10:27
Member 448708313-Jun-14 10:27 
GeneralRe: Selective queries? Pin
Mycroft Holmes13-Jun-14 13:10
professionalMycroft Holmes13-Jun-14 13:10 
AnswerRe: Selective queries? Pin
Jörgen Andersson13-Jun-14 9:21
professionalJörgen Andersson13-Jun-14 9:21 
AnswerRe: Selective queries? Pin
Tim Carmichael13-Jun-14 13:00
Tim Carmichael13-Jun-14 13:00 
AnswerRe: Selective queries? Pin
Member 448708316-Jun-14 7:08
Member 448708316-Jun-14 7:08 
AnswerRe: Selective queries? Pin
Member 448708324-Jun-14 7:25
Member 448708324-Jun-14 7:25 
QuestionOLEDB for Old school DBASE or Foxpro databases, SUM with 2 decimal places Pin
jkirkerx12-Jun-14 18:30
professionaljkirkerx12-Jun-14 18:30 
I'm back to the old foxpro databases using OLEDB.

I'm suppose to pull all the items in a Sales Orders, and go back into the history database file, and get the total QYT and AMOUNT purchased in the past as well.

I can do the math, but wow it's slow!, and I have an issue at the end with formatting the number with 2 decimal places for the cents. So I'm not sure if I need to fix it in the database call, or try and fix it when presenting the number in the PDF.

So $85.30 appears as $85.3

In the past I have had trouble, but not for years since.
The other one i.FPRICE works fine, so I'm scratching my head on this one.

Here's what I have
SELECT  
  i.FCUSTNO 
, i.FORDQTY 
, i.FITEMNO 
, i.FDESCRIPT 
, i.FPRICE 
, (SELECT SUM(s.FSHIPQTY) FROM ARTRS01H.dbf s WHERE s.FCUSTNO = i.FCUSTNO AND s.FITEMNO = i.FITEMNO) AS FSHIPQTY 
, (SELECT SUM(s.FAMOUNT) FROM ARTRS01H.dbf s WHERE s.FCUSTNO = i.FCUSTNO AND s.FITEMNO = i.FITEMNO) AS FAMOUNT
 FROM SOTRS01.dbf i
 WHERE i.FSONO=@FSONO

The reader
If Not (reader.IsDBNull(5)) Then sIRi(rC).FATD_SHIPQTY = reader.GetValue(5)
If Not (reader.IsDBNull(6)) Then sIRi(rC).FATD_TOTAL = reader.GetValue(6)

And in ASP.Net to create a PDF of the Order Confirmation
Dim lbl_item_FATD_TOTAL As Label
lbl_item_FATD_TOTAL = New Label("", 373, currentY, 45, 12, Font.Courier, 9, TextAlign.Right)
lbl_item_FATD_TOTAL.Text = String.Format("{0:c}", sSOI(idx).FATD_TOTAL)
currentPage.Elements.Add(lbl_item_FATD_TOTAL)


Any Suggestions would be cool.
AnswerRe: OLEDB for Old school DBASE or Foxpro databases, SUM with 2 decimal places Pin
Eddy Vluggen13-Jun-14 7:51
professionalEddy Vluggen13-Jun-14 7:51 
General[SOLVED] Pin
jkirkerx13-Jun-14 8:55
professionaljkirkerx13-Jun-14 8:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.