DateAdd Function and error BC30451

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!
 
C

Chris R. Timmons

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top