Hi Jogi!<br>
<br>
I've seen that done (see the book by Joseph Moniz called 'Enterprise Application Architecture with VB, ASP, MTS'. Once you get past his jargon, the architecture seems to be pretty solid.<br>
<br>
I guess one reason for *not* using the ADO recordset is if you have any datatypes that don't cleanly map to one of the supported types. We had a currency that was 21 digits long (fifteen digits to the left of the decimal, and six to the right), which none of the Microsoft integral datatypes could handle, so we ended up using 'string' -- most unsatisfactory, but it worked.<br>
<br>
Chip H.<br>
Hi Chip!<br>
<br>
We do not have such an exceptional case in our project. But we will consider your experience and decide accordingly. I still have a confusion. Let us say my bussiness tier sends say 100 records to user tier. How will we incorporate string there.<br>
<br>
Thanks for your response.<br>
<br>
Jogi
Hi Jogi!<br>
<br>
I'm a little confused -- I think you're asking: 'If I have a datatype that doesn't map cleanly, and I end up using a string to pass it, how would that work?'<br>
<br>
And the answer is: Fairly simply. If I have a field called "BigNumber", in the software layer closest to the database, I'd do something like:<br>
<br>
public property get szBigNumber() as string<br>
szBigNumber = CStr(MyRecordset.Fields("BigNumber))<br>
end property<br>
<br>
If the ADO recordset itself can't handle the datatype, then I would create a View in the database which does the conversion for me, and ADO will be able to handle that (as a string) just fine.<br>
<br>
CREATE VIEW SalesNumView AS<br>
SELECT PrimaryKey, STR(BigNumber), OtherField<br>
FROM SalesNumTable;<br>
<br>
Is that what you're asking?<br>
<br>
Chip H.<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.