> I have tried adding "Imports System.Diagnostics" to the vb page. How
> do i reference this on the command line?. I have tried using /r:
> System. Diagnostics.dll but I get a 2017 compile error.
Ah, now I see what the problem is.
Unfortunately Microsoft have confused issues with the names of their
assemblies - they appear to look as if they are named after namespaces,
but this is not correct. A namespace is just a prefix to the name of a
class, it has no bearing on the assembly where a class is defined. In
fact, an assembly can have types of several namespaces, and types of the
same namespace can be defined in several assemblies.
Most of the classes in System.Diagnostics are in the system.dll
assembly, there is no System.Diagnostics.dll assembly. However, the only
way to know for sure is to look up the class in the documentation.
> Do you have any thoughts about this and what do you think the missing
> namespace could be for the "Command" error.
SqlCommand is in the System.Data.SqlClient namespace and is defined in
the system.data.dll assembly.
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlCo
mmandClassTopic.asp?frame=true
Richard

Signature
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm
martinharvey - 19 Oct 2005 09:29 GMT
>> I have tried adding "Imports System.Diagnostics" to the vb page. How
>> do i reference this on the command line?. I have tried using /r:
[quoted text clipped - 22 lines]
>
>Richard
Thank you for your patience with this Richard
I am referencing both the system.data.dll and system.dll in the command
line as well as Imports System.Diagnostics in the .vb page but i am still
getting the same error i mentioned in my first query.
I am pulling my hair out with this
Any further thoughts
Thank you
Martin
Richard Grimes - 19 Oct 2005 14:28 GMT
> Thank you for your patience with this Richard
>
[quoted text clipped - 5 lines]
>
> Any further thoughts
Yes, sorry I should have tried to compile the code myself. Now I have
done, here's how I got it to compile.
You need Imports for System.Data, System.Data.SqlClient and
System.Configuration.
You need to reference two assemblies on the command line:
system.data.dll and system.dll
Finally, the connectionString is not defined anywhere. So either make it
a parameter of the function, or make it a constant.
Richard

Signature
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm
martinharvey - 20 Oct 2005 09:46 GMT
>> Thank you for your patience with this Richard
>>
[quoted text clipped - 15 lines]
>
>Richard
Thank you once again Richard
I had tried the above combination before and got the same error . I think you
are right about defining the
connection string.
The connection string i have in the web file app settings is;
<add key="ConnectionString"
value="server=localhost;Trusted_Connection=true;database=worldshop" />
What would the exact syntax be for making this a constant or a parameter of
the function.
many thanks
martin
Richard Grimes - 20 Oct 2005 22:11 GMT
> I had tried the above combination before and got the same error . I
> think you are right about defining the
[quoted text clipped - 4 lines]
> <add key="ConnectionString"
> value="server=localhost;Trusted_Connection=true;database=worldshop" />
If it is in <appSettings> then you should read it from there:
Dim connection_string As String
connection_string =
ConfigurationSettings.AppSettings("ConnectionString")
Richard

Signature
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm
martinharvey - 23 Oct 2005 08:08 GMT
>> I had tried the above combination before and got the same error . I
>> think you are right about defining the
[quoted text clipped - 9 lines]
>
>Richard
Just a quick note to let you know i got it working
many many thanks for your help with this Richard
martin