Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Confused about project references / data access application block (http://www.velocityreviews.com/forums/t82849-confused-about-project-references-data-access-application-block.html)

EO 07-16-2004 12:51 AM

Confused about project references / data access application block
 
I am trying to use the MSFT data access application block on 3 machines.

Machine 1:
Sandbox environment; I installed the application block with the msi. The
Sqlhelper class compiles & runs great! (Also the SqlhelperParameterCache
class; I'll refer to them collectively as the SqlHelper class.) I'm using
unmodified application block code in all cases.

Machine 2:
Development environment, different project
I don't know if the msi does anything I could not replicate on the machine 3
to which I don't have console access and will deploy this project, so I have
taken the cautious approach. I copied the SqlHelper.vb to the project on
machine 2 & hit build. I got a facefull of errors:
a) Machine 2 did not have a project reference to system.xml, which machine 1
did. They now have identical references with exception that machine 2 also
has a project reference to msocorlib and machine1 does not.
b) I added imports statements to the machine 2 SqlHelper class file: Adding
Imports to System, System.Data, & System.Collections, all references
resolved except item c.
c) I still have a "name 'iif' not declared" error for the one iif statement
in the code.

Machine 3:
Production environment on a hosted server to which I have only ftp access.

So...
a) what namespace do I have to import to get my iif back?
b) Please help me understand why the same code compiles fine on machine 1
but requres extra imports statments on machine 2 despite identical project
references?
c) Is the mscorlib reference necessary?
d) extra credit :-) I also added another class on machine 2 from machine 1
(no dependencies with SqlHelper). Machine 1 accesses
configurationsettings.appsettings without importing system.configuration,
but machine 2 requires me to import system.configuration.

Alert item: Machine 2 runs ZoneAlarmPro, which does not play well with
vs.net. I disable Zonealarm during development, but it may have been on when
vs.net was installed or the project created. Therefore, "FDisk" may be a
legitemate solution. :-(. (Oh please, oh please, noooooo)

Article links or direct answers equally appreciated.

:-)



Bobby Ryzhy 07-16-2004 04:41 PM

Re: Confused about project references / data access application block
 
Just rip out the Sqlhelper class and add it to you project - then change the namespace for that file to your namespace - all should work
hunky dory.

Bobby Ryzhy
bobby@ domain below
http://weekendtech.net

On Thu, 15 Jul 2004 19:51:26 -0500, "EO" <HeyYou@ErnestOstrander.com> wrote:

>I am trying to use the MSFT data access application block on 3 machines.
>
>Machine 1:
>Sandbox environment; I installed the application block with the msi. The
>Sqlhelper class compiles & runs great! (Also the SqlhelperParameterCache
>class; I'll refer to them collectively as the SqlHelper class.) I'm using
>unmodified application block code in all cases.
>
>Machine 2:
>Development environment, different project
>I don't know if the msi does anything I could not replicate on the machine 3
>to which I don't have console access and will deploy this project, so I have
>taken the cautious approach. I copied the SqlHelper.vb to the project on
>machine 2 & hit build. I got a facefull of errors:
>a) Machine 2 did not have a project reference to system.xml, which machine 1
>did. They now have identical references with exception that machine 2 also
>has a project reference to msocorlib and machine1 does not.
>b) I added imports statements to the machine 2 SqlHelper class file: Adding
>Imports to System, System.Data, & System.Collections, all references
>resolved except item c.
>c) I still have a "name 'iif' not declared" error for the one iif statement
>in the code.
>
>Machine 3:
>Production environment on a hosted server to which I have only ftp access.
>
>So...
>a) what namespace do I have to import to get my iif back?
>b) Please help me understand why the same code compiles fine on machine 1
>but requres extra imports statments on machine 2 despite identical project
>references?
>c) Is the mscorlib reference necessary?
>d) extra credit :-) I also added another class on machine 2 from machine 1
>(no dependencies with SqlHelper). Machine 1 accesses
>configurationsettings.appsettings without importing system.configuration,
>but machine 2 requires me to import system.configuration.
>
>Alert item: Machine 2 runs ZoneAlarmPro, which does not play well with
>vs.net. I disable Zonealarm during development, but it may have been on when
>vs.net was installed or the project created. Therefore, "FDisk" may be a
>legitemate solution. :-(. (Oh please, oh please, noooooo)
>
>Article links or direct answers equally appreciated.
>
>:-)
>


Bobby Ryzhy
bobby @ domain below
http://weekendtech.net


All times are GMT. The time now is 07:26 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.