DateAdd Function and error BC30451

  • Thread starter Thread starter Matt Tapia
  • Start date Start date
M

Matt Tapia

I trying to compile a .vb file as such:

vbc /t:library /out:C:\Inetpub\wwwroot\crm\bin\CRMWebServices.dll
/r:System.dll /r:System.Data.Dll /r:System.Web.Services.dll
/r:System.Xml.dll C:\Inetpub\wwwroot\crm\CRMdbService.vb

In the file I used the function DateAdd. When I compile I get Error BC30451
Name 'DateAdd' is not declared. I have the following imports in my code:

Imports System

Imports System.Data

Imports System.Data.SqlClient

Imports System.Web.Services



Can someone tell me what I need to do to compile this?



THanks!
 
I trying to compile a .vb file as such:

vbc /t:library
/out:C:\Inetpub\wwwroot\crm\bin\CRMWebServices.dll /r:System.dll
/r:System.Data.Dll /r:System.Web.Services.dll /r:System.Xml.dll
C:\Inetpub\wwwroot\crm\CRMdbService.vb

In the file I used the function DateAdd. When I compile I get
Error BC30451 Name 'DateAdd' is not declared. I have the
following imports in my code:

Imports System

Imports System.Data

Imports System.Data.SqlClient

Imports System.Web.Services



Can someone tell me what I need to do to compile this?

Matt,

I'm not a VB.Net programmer, but I believe you also need to add a
reference to Microsoft.VisualBasic.dll to the vbc.exe command line.
And possibly "Imports Microsoft.VisualBasic" to your code (?).

Hope this helps.

Chris.
 
Back
Top