Actually, you have a lot of problems here. You're declaring your variables as
string.Empty and then you're assembling a string with them:
sql += " INTO('" + lid + "', '" + bid + "', '" ....
Evaluates to:
Notice how the column names would be missing, and what you should be doing is first using parameterized SQL, see threads:
http://www.daniweb.com/forums/thread191241.html
http://www.daniweb.com/forums/thread198304.html
Next your query should look like (if you continue dynamically building queries like this)
INSERT INTO TableToInsert (lid, bid, MID, ldate, rdate, famount, fpaid)
SELECT LoanID, BookID, MemberID, LoanDate, ReturnDate, FineAmount, FinePaid
FROM Loan
WHERE loadId = 12345
And the value of the fields you initialized is never changed after they are initialized, so I do not understand why you are setting a text box with those values:
These are never set after initialization in the code you posted:
string lid = "";
string bid = "";
string mid = "";
string ldate = "";
string rdate = "";
string famount = "";
string fpaid = "";