<PAGE>

                                                                    EXHIBIT 10.1

                         CONSENT AND THIRD AMENDMENT TO
             SIXTH AMENDED AND RESTATED LOAN AND SECURITY AGREEMENT

      This CONSENT AND THIRD AMENDMENT TO SIXTH AMENDED AND RESTATED LOAN AND
SECURITY AGREEMENT (this "Amendment") is entered into as of this 30 day of
August, 2004, by and among D&K HEALTHCARE RESOURCES, INC., a Delaware
corporation ("D&K"), JEWETT DRUG CO., a South Dakota corporation ("Jewett"),
DIVERSIFIED HEALTHCARE, LLC, a Kentucky limited liability company ("DH"),
MEDICAL & VACCINE PRODUCTS, INC. d/b/a DEVICTORIA MEDICAL, a Puerto Rico
corporation ("MVP"); MYHCA, INC., a Texas corporation ("myhca"), RXDIRECT, INC.,
a Texas corporation ("RxDirect"), WALSH DISTRIBUTION, L.L.C., an Arkansas
limited liability company ("Walsh Distribution"), WALSH HEALTHCARE SOLUTIONS,
INC., an Arkansas corporation ("Walsh"), WALSH HEARTLAND, L.L.C., an Arkansas
limited liability company ("Walsh Heartland"; together with myhca, RxDirect,
Walsh Distribution, Walsh, D&K, Jewett, DH and MVP are sometimes hereafter
referred to individually as "Borrower" and collectively as "Borrowers"), FLEET
CAPITAL CORPORATION, a Rhode Island corporation, individually as a Lender and as
Agent ("Agent") for itself and each other Lenders, and the other Lenders
signatory hereto. Unless otherwise specified herein, capitalized terms used in
this Amendment shall have the meanings ascribed to them in the Loan Agreement
(as hereinafter defined).

                                    RECITALS

      WHEREAS, Borrowers, Agent and Lenders have entered into that certain Sixth
Amended and Restated Loan and Security Agreement, dated as of March 28, 2003 (as
previously amended, supplemented, restated or otherwise modified from time to
time, the "Loan Agreement");

      WHEREAS, Borrowers, Agent and Lenders desire to amend the Loan Agreement
as herein set forth.

      NOW THEREFORE, in consideration of the foregoing recitals, mutual
agreements contained herein and for good and valuable consideration, the receipt
and sufficiency of which are hereby acknowledged, Borrowers, Agent and Lenders
agree as follows:

      SECTION 1 AMENDMENT REGARDING EXERCISE OF PBI PUT. Upon D&K's purchase of
all outstanding capital stock of PBI (the "FBI Stock Repurchase"), either:

      (a)   in the event that the PBI Stock Repurchase is funded with the
proceeds of Loans, then, simultaneously with the closing of the PBI Stock
Repurchase, (i) D&K shall pledge 100% of the capital stock of PBI to Agent, for
the benefit of the Lenders and (ii) PBI shall guaranty the Obligations and grant
to Agent, for the benefit of itself and the Lenders, a first priority perfected
Lien (subject to Permitted Liens) in all assets owned by PBI and D&K, and PBI
shall further execute such documents and take such actions as may be required by
Agent in connection therewith (including, without limitation, the execution of
all necessary security agreements, intellectual property security agreements,
mortgages, deeds of trust and guarantees); or

                                       1
<PAGE>

      (b)   in the event that the PBI Stock Repurchase is funded with the
proceeds of financing from a source other than the Loans, then, simultaneously
with the closing of the PBI Stock Repurchase, the Loan Agreement is hereby
amended to:

            (A)   delete the penultimate paragraph in Section 8.2.1.

            (B)   delete the phrase "(i) through (x) above" in the first line of
                  subsection (xi) of Section 8.2.3 and insert the phrase "(i)
                  through (xi) above" in place thereof, renumber the existing
                  subsection (xi) of Section 8.2.3 as subsection (xii) and
                  insert a new subsection (xi) in place thereof that reads as
                  follows:

                        (xi) guaranty of the obligations of PBI in an amount not
                  to exceed $12,400,000 and solely to the extent necessary to
                  facilitate the repurchase by D&K of all outstanding capital
                  stock of PBI, provided that such guaranty shall be secured
                  solely with a pledge by D&K of the capital stock in PBI.

            (C)   replace the phrase "and" prior to subsection (ix) of Section
                  8.2.5 with a comma and add the following subsection (xi) at
                  the end thereof that reads as follows:

                        and (xi) Liens on the capital stock of PBI owned by D&K
                  solely to the extent that such Liens secure the guaranty
                  obligations of D&K permitted under subsection (xi) of Section
                  8.2.3.

            (D)   insert the following new sentence at the end of Section 8.2.12
                  to read as follows:

                        Notwithstanding the foregoing, the Borrowers and the
                  Subsidiaries shall not make any Restricted Investments in PBI.

            (E)   delete clause (ii) of the definition of "Subsidiary" in
                  Appendix A of the Loan Agreement and insert the phrase "(ii)
                  PBI shall not be deemed to be a Subsidiary for purposes of
                  Section 8.2" in place thereof."

      SECTION 2 ADDITIONAL AMENDMENTS.

      (a)   Exhibits 8.3 of the Loan Agreement is hereby amended by amending and
restating the paragraph titled "Covenants" to read as follows:

            FIXED CHARGE COVERAGE RATIO. Borrowers shall not permit the Fixed
Charge Coverage Ratio, on a Consolidated basis, for any period of twelve months
ending on the dates set forth below to be less than the ratio set forth below
opposite such period:

                                       2
<PAGE>

<TABLE>
<CAPTION>
                     PERIOD                                   RATIO
---------------------------------------------               -----------
<S>                                                         <C>
June 30, 2003                                               1.25 to 1.0
September 30, 2003                                          1.25 to 1.0
December 31, 2003                                           1.25 to 1.0
March 31, 2004                                              1.50 to 1.0
June 30, 2004 and the last day of each fiscal               1.15 to 1.0
  quarter thereafter through March 31, 2007
</TABLE>

            MINIMUM ADJUSTED TANGIBLE NET WORTH. Borrowers shall maintain at all
      times Consolidated Adjusted Tangible Net Worth of not less than the amount
      shown below for the period corresponding thereto:

<TABLE>
<CAPTION>
                      PERIOD                                 AMOUNT
-----------------------------------------                 -------------
<S>                                                       <C>
At all times prior to March 30, 2004                      $  95,000,000
From March 31, 2004 through June 29, 2004                 $ 100,000,000
From June 30, 2004 through June 29, 2005                  $  91,500,000
From June 30, 2005 through June 29, 2006                  $ 102,000,000
From June 30, 2006 through March 31, 2007                 $ 112,000,000
</TABLE>

      (b)   The definition of "Borrowing Base" in Appendix A to the Loan
Agreement is hereby amended by deleting the phrase "65%" in clause (b)(2)
thereof and inserting the phrase "70%" in place thereof.

      (c)   The definition of "Capital Expenditure" in Appendix A to the Loan
Agreement is hereby amended by adding the following sentence at the end thereof:

            Notwithstanding the foregoing, expenditures made or liabilities
      incurred with respect to any Parata pill dispensing machines shall be
      excluded from the definition of "Capital Expenditures" to the extent the
      transfer of such machine by D&K or its Subsidiary, as applicable, to D&K's
      or its Subsidiary's respective customer is treated as an operating lease
      under GAAP.

      SECTION 3 CONDITIONS TO EFFECTIVENESS. This Amendment shall be effective
upon satisfaction of the following conditions precedent:

      (a)   This Amendment shall have been executed and delivered by all Lenders
and Borrowers; provided, however, that the amendments set forth in Section 1 and
Sections 2(a) and (c) above shall be effective as long as this Amendment shall
have been executed and delivered by the Majority Lenders and Borrowers;

      (b)   The representations and warranties contained in this Amendment shall
be true and correct in all respects; and

      (c)   Satisfaction of the conditions required under Section 4 hereof.

                                       3
<PAGE>

      SECTION 4 ADDITIONAL CONDITIONS PRECEDENT: PAYMENT OF CONSENT FEES.

      (a)   Section 2(b) of this Amendment shall be effective upon the payment
by Borrowers to Agent, for the benefit of all Lenders, a consent fee in the
amount of .05% of the Revolving Loan Commitments.

      (b)   This Amendment (except with respect to Section 2(b) hereof) shall be
effective upon the payment by Borrowers to Agent, for the benefit of each
consenting Lender, a consenting Lender fee in the amount of $5,000 for each
Lender who executes and delivers to Agent this Amendment.

      The fees payable under this Section 4 shall be due and payable upon the
effectiveness of the amendment for which such fee relates and in all cases shall
be non-refundable.

      SECTION 5 REPRESENTATIONS AND WARRANTIES OF BORROWERS.

      (a)   The execution, delivery and performance by each Borrower of this
Amendment has been duly authorized by all necessary corporate action and this
Amendment is a legal, valid and binding obligation of such Borrower enforceable
against such Borrower in accordance with its terms, except as the enforcement
thereof may be subject to (i) the effect of any applicable bankruptcy,
insolvency, reorganization, moratorium or similar law affecting creditors'
rights generally and (ii) general principles of equity (regardless of whether
such enforcement is sought in a proceeding in equity or at law); and

      (b)   Each of the representations and warranties contained in the Loan
Agreement is true and correct in all material respects on and as of the date
hereof as if made on the date hereof, except to the extent that such
representations and warranties expressly relate to an earlier date.

      SECTION 6 REFERENCE TO AND EFFECT UPON THE LOAN AGREEMENT.

      (a)   Except as specifically set forth above, the Loan Agreement and the
other Loan Documents shall remain in full force and effect and are hereby
ratified and confirmed.

      (b)   The execution, delivery and effectiveness of this Amendment shall
not operate as a waiver of any right, power or remedy of Agent or any Lender
under the Loan Agreement or any other Loan Document, nor constitute amendment of
any provision of the Loan Agreement or any other Loan Document, except as
specifically set forth herein. Upon the effectiveness of this Amendment, each
reference in the Loan Agreement to "this Agreement", "hereunder", "hereof",
"herein" or words of similar import shall mean and be a reference to the Loan
Agreement as amended hereby.

      SECTION 7 COSTS AND EXPENSES. As provided in the Loan Agreement, Borrowers
agree to reimburse Agent for all fees, costs and expenses, including the
reasonable fees, costs and expenses of counsel in connection with this
Amendment.

                                       4
<PAGE>

      SECTION 8 LOAN DOCUMENTS. This Amendment shall constitute a Loan Document.

      SECTION 9 GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY AND CONSTRUED
IN ACCORDANCE WITH THE INTERNAL LAWS (AS OPPOSED TO CONFLICTS OF LAWS
PROVISIONS) OF THE STATE OF ILLINOIS.

      SECTION 10 HEADINGS. Section headings in this Amendment are included
herein for convenience of reference only and shall not constitute a part of this
Amendment for any other purposes.

      SECTION 11 COUNTERPARTS. This Amendment may be executed in any number of
counterparts, each of which when so executed shall be deemed an original, but
all such counterparts shall constitute one and the same instrument.

                            (signature pages follow)

                                       5
<PAGE>

      IN WITNESS WHEREOF, the parties hereto have executed and delivered this
Consent and Third amendment to the Sixth Amended and Restated Loan and Security
Agreement as of the date first written above.

                                    D&K HEALTHCARE RESOURCES, INC.

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By Thomas S. Hilton
                                    Title SVP and CFO

                                    JEWETT DRUG CO.

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By Thomas S. Hilton
                                    Title VP

                                    DIVERSIFIED HEALTHCARE, LLC

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By Thomas S. Hilton
                                    Title VP

                                    MEDICAL & VACCINE PRODUCTS, INC. d/b/a
                                    DEVICTORIA MEDICAL

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By Thomas S. Hilton
                                    Title VP

                                    MYHCA, INC.

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By: Thomas S. Hilton
                                    Title: VP

                                    RXDIRECT, INC.

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By: Thomas S. Hilton
                                    Title: VP

                                    WALSH DISTRIBUTION, L.L.C.

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By: Thomas S. Hilton
                                    Title: VP

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    WALSH HEALTHCARE SOLUTIONS, INC.

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By: Thomas S. Hilton
                                    Title: V.P.

                                    WALSH HEARTLAND, L.L.C

                                    /s/ Thomas S. Hilton
                                    --------------------------------------------
                                    By: Thomas S. Hilton
                                    Title: V.P.

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    CONGRESS FINANCIAL CORPORATION
                                    (CENTRAL)

                                    /s/ Laura Dixon
                                    --------------------------------------------
                                    By: Laura Dixon
                                    Title: Assistant Vice President

                                    LD    consent to Section 2(b)

                                    LD    consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    FIFTH THIRD BANK, INDIANA

                                    /s/ Shawn Hagan
                                    --------------------------------------------
                                    By: Shawn Hagan
                                    Title: Vice President

  [Consent and Amendment No. 1 to Sixth Amended and Restated Loan and Security
                                   Agreement]

                                      S-6
<PAGE>

                                    FIRST BANK

                                    /s/ Keith M. Schmelder
                                    --------------------------------------------
                                    By: Keith M. Schmelder
                                    Title S.V.P

                                    KMS consent to Section 2(b)

                                    KMS consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    FLEET CAPITAL CORPORATION,
                                     as Agent and as a Lender

                                    /s/ Edward Bartkowski
                                    --------------------------------------------
                                    By:    Edward Bartkowski
                                    Title: SVP

                                    EB    consent to Section 2(b)

                                    EB    consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    JPMORGAN CHASE BANK

                                    /s/ John M. Hariaczyi
                                    --------------------------------------------
                                    By:    John M. Hariaczyi
                                    Title: Vice President

                                    JMH   consent to Section 2(b)

                                    JMH   consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    KEY BANK, N.A.

                                    /s/ Timothy W. Kenealy
                                    --------------------------------------------
                                    By:    Timothy W. Kenealy
                                    Title: Assistant Vice President

                                    TWK   consent to Section 2(b)

                                    TWK   consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    LASALLE BUSINESS CREDIT, LLC

                                    /s/ Timothy A. Wolat
                                    --------------------------------------------
                                    By:    Timothy A. Wolat
                                    Title: Vice President

                                    TAW   consent to Section 2(b)

                                    TAW   consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    NATIONAL CITY BUSINESS CREDIT, INC.

                                    /s/ Michael Fine
                                    --------------------------------------------
                                    By:    Michael Fine
                                    Title: Director

                                    MF    consent to Section 2(b)

                                    MF    consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    PNC BANK NATIONAL ASSOCIATION

                                    /s/ James M. Stetley
                                    --------------------------------------------
                                    By:    James M. Stetley
                                    Title: Vice President

                                    JMS   consent to Section 2(b)

                                    JMS   consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    SIEMENS FINANCIAL SERVICES, INC.

                                    /s/ Frank Amodio
                                    --------------------------------------------
                                    By: Frank Amodio
                                    Title: Vice President-Credit

                                    FA consent to Section 2(b)

                                    FA consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    THE CIT GROUP/BUSINESS CREDIT, INC.

                                    /s/ Anthony Alexander
                                    --------------------------------------------
                                    By: Anthony Alexander
                                    Title: Vice President

                                    AA    consent to Section 2(b)

                                    AA    consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    UNION BANK OF CALIFORNIA, N.A.

                                    /s/ Greg F. Ennis
                                    --------------------------------------------
                                    By: Greg F. Ennis
                                    Title: Vice President

                                    GFE consent to Section 2(b)

                                    GFE consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    U.S. BANK NATIONAL ASSOCIATION

                                    /s/ Lisa M. Riley
                                    --------------------------------------------
                                    By: Lisa M. Riley
                                    Title: Vice President

                                    LMR consent to Section 2(b)

                                    LMR consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    WASHINGTON MUTUAL BANK

                                    /s/ Deborah Saffie
                                    --------------------------------------------
                                    By: Deborah Saffie
                                    Title: Vice President

                                    DES consent to Section 2(b)

                                    DES consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    WELLS FARGO FOOTHILL, LLC

                                    /s/ Patrick McCormack
                                    --------------------------------------------
                                    By: Patrick McCormack
                                    Title: Assistant Vice President

                                    PM consent to Section 2(b)

                                    PM consent to remainder of Amendment

  [Consent and Third Amendment to sixth Amended and Restated Loan and Security
                                   Agreement]

<PAGE>

                                    WEBSTER BUSINESS CREDIT CORPORATION

                                    /s/ Otto Brunke
                                    --------------------------------------------
                                    By: Otto Brunke
                                    Title: Asst. Vice President

                                    OB consent to Section 2(b)

                                    OB consent to remainder of Amendment

  [Consent and Third Amendment to Sixth Amended and Restated Loan and Security
                                   Agreement]