Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

marcus_vinicius

Erro ao compilar classe!!! !!!!

Recommended Posts

Salve povo!!!Bom o que ta pegando é o seguinte, tenho uma classe em vb.net e to tentando compilar mas não vai nem a pau!Eu tenho que dar um Imports System.Data.SQLClient na minha classee ele não compila pq não reconheceerro:"namespace or typedata for the imports system.data cannot be found"isso pelo vbc via dos pq via vs.net nem compila...alguém pode me ajudar?É meio urgente e eu não sei o que é.... na verdade nunca vi esse erro antes...valeuMarcusUIN: 118518664marc.marcus@bol.com.br

Compartilhar este post


Link para o post
Compartilhar em outros sites

'Static ModelImports SystemImports System.DataImports System.Data.SQLClientNamespace DigiexpressPublic Class Cliente#Region " Variáveis Internas "Dim conBanco = NewSQLConnection(System.Configuration.ConfigurationSettings.AppSettings("appConn"))Dim dapAdapter As SqlDataAdapter = New SqlDataAdapterDim dtsDataSet As DataSet = New DataSet("Granifera")Dim dttClientes As DataTable = dtsDataSet.Tables.Add("Clientes")Dim cmdCommand As SqlCommand = conBanco.CreateCommand()#End RegionPrivate prpClieCodi As ShortPublic Property ClieCodi() As ShortGetReturn prpClieCodiEnd GetSet(ByVal Value As Short)prpClieCodi = ValueEnd SetEnd PropertyPrivate prpClieNome As StringPublic Property ClieNome() As StringGetReturn prpClieNomeEnd GetSet(ByVal Value As String)prpClieNome = ValueEnd SetEnd PropertyPrivate prpClieRaza As StringPublic Property ClieRaza() As StringGetReturn prpClieRazaEnd GetSet(ByVal Value As String)prpClieRaza = ValueEnd SetEnd PropertyPrivate prpClieDaIn As DatePublic Property ClieDaIn() As DateGetReturn prpClieDaInEnd GetSet(ByVal Value As Date)prpClieDaIn = ValueEnd SetEnd PropertyPrivate prpClieCPCN As StringPublic Property ClieCPCN() As StringGetReturn prpClieCPCNEnd GetSet(ByVal Value As String)prpClieCPCN = ValueEnd SetEnd PropertyPrivate prpClieRGIE As StringPublic Property ClieRGIE() As StringGetReturn prpClieRGIEEnd GetSet(ByVal Value As String)prpClieRGIE = ValueEnd SetEnd PropertyPrivate prpClieStat As BooleanPublic Property ClieStat() As BooleanGetReturn prpClieStatEnd GetSet(ByVal Value As Boolean)prpClieStat = ValueEnd SetEnd PropertyPrivate prpClieFaxx As StringPublic Property ClieFaxx() As StringGetReturn prpClieFaxxEnd GetSet(ByVal Value As String)prpClieFaxx = ValueEnd SetEnd PropertyPrivate prpClieEmai As StringPublic Property ClieEmai() As StringGetReturn prpClieEmaiEnd GetSet(ByVal Value As String)prpClieEmai = ValueEnd SetEnd PropertyPrivate prpClieCont As StringPublic Property ClieCont() As StringGetReturn prpClieContEnd GetSet(ByVal Value As String)prpClieCont = ValueEnd SetEnd PropertyPrivate prpClieVend As ShortPublic Property ClieVend() As ShortGetReturn prpClieVendEnd GetSet(ByVal Value As Short)prpClieVend = ValueEnd SetEnd PropertyPrivate prpClieObse As StringPublic Property ClieObse() As StringGetReturn prpClieObseEnd GetSet(ByVal Value As String)prpClieObse = ValueEnd SetEnd PropertyPrivate prpClieEnEn As StringPublic Property ClieEnEn() As StringGetReturn prpClieEnEnEnd GetSet(ByVal Value As String)prpClieEnEn = ValueEnd SetEnd PropertyPrivate prpClieEnBa As StringPublic Property ClieEnBa() As StringGetReturn prpClieEnBaEnd GetSet(ByVal Value As String)prpClieEnBa = ValueEnd SetEnd PropertyPrivate prpClieEnCi As StringPublic Property ClieEnCi() As StringGetReturn prpClieEnCiEnd GetSet(ByVal Value As String)prpClieEnCi = ValueEnd SetEnd PropertyPrivate prpClieEnEs As StringPublic Property ClieEnEs() As StringGetReturn prpClieEnEsEnd GetSet(ByVal Value As String)prpClieEnEs = ValueEnd SetEnd PropertyPrivate prpClieEnCe As StringPublic Property ClieEnCe() As StringGetReturn prpClieEnCeEnd GetSet(ByVal Value As String)prpClieEnCe = ValueEnd SetEnd PropertyPrivate prpClieEnTe As StringPublic Property ClieEnTe() As StringGetReturn prpClieEnTeEnd GetSet(ByVal Value As String)prpClieEnTe = ValueEnd SetEnd PropertyPrivate prpClieCoEn As StringPublic Property ClieCoEn() As StringGetReturn prpClieCoEnEnd GetSet(ByVal Value As String)prpClieCoEn = ValueEnd SetEnd PropertyPrivate prpClieCoBa As StringPublic Property ClieCoBa() As StringGetReturn prpClieCoBaEnd GetSet(ByVal Value As String)prpClieCoBa = ValueEnd SetEnd PropertyPrivate prpClieCoCi As StringPublic Property ClieCoCi() As StringGetReturn prpClieCoCiEnd GetSet(ByVal Value As String)prpClieCoCi = ValueEnd SetEnd PropertyPrivate prpClieCoEs As StringPublic Property ClieCoEs() As StringGetReturn prpClieCoEsEnd GetSet(ByVal Value As String)prpClieCoEs = ValueEnd SetEnd PropertyPrivate prpClieCoCe As StringPublic Property ClieCoCe() As StringGetReturn prpClieCoCeEnd GetSet(ByVal Value As String)prpClieCoCe = ValueEnd SetEnd PropertyPrivate prpClieCoTe As StringPublic Property ClieCoTe() As StringGetReturn prpClieCoTeEnd GetSet(ByVal Value As String)prpClieCoTe = ValueEnd SetEnd PropertyPrivate prpClieFaEn As StringPublic Property ClieFaEn() As StringGetReturn prpClieFaEnEnd GetSet(ByVal Value As String)prpClieFaEn = ValueEnd SetEnd PropertyPrivate prpClieFaBa As StringPublic Property ClieFaBa() As StringGetReturn prpClieFaBaEnd GetSet(ByVal Value As String)prpClieFaBa = ValueEnd SetEnd PropertyPrivate prpClieFaCi As StringPublic Property ClieFaCi() As StringGetReturn prpClieFaCiEnd GetSet(ByVal Value As String)prpClieFaCi = ValueEnd SetEnd PropertyPrivate prpClieFaEs As StringPublic Property ClieFaEs() As StringGetReturn prpClieFaEsEnd GetSet(ByVal Value As String)prpClieFaEs = ValueEnd SetEnd PropertyPrivate prpClieFaCe As StringPublic Property ClieFaCe() As StringGetReturn prpClieFaCeEnd GetSet(ByVal Value As String)prpClieFaCe = ValueEnd SetEnd PropertyPrivate prpClieFaTe As StringPublic Property ClieFaTe() As StringGetReturn prpClieFaTeEnd GetSet(ByVal Value As String)prpClieFaTe = ValueEnd SetEnd PropertyPublic Function Gravar() As ShortEnd FunctionPublic Function Excluir() As ShortEnd Function'Método Interno que atribui valores às variáveisPrivate Sub Atribuir()End Sub'Método contrutor que, se tiver algo no BD, já retorna o último registroPublic Sub New()conBanco.open()cmdCommand.CommandText = "SELECT TOP 1 * FROM clientes ORDER BY cliecodi"dapAdapter.SelectCommand = cmdCommanddapAdapter.Fill(dtsDataSet, "Projetos")prpClieNome = dtsDataSet.Tables(0).Rows(0).Item(1)conBanco.close()End Sub'Método correspondente ao MoveCertoPublic Sub New(ByVal ClieCodi As Short)End SubEnd ClassEnd Namespaceeu apenas preciso compilar essa classe, mas ta embaçado!!1

Compartilhar este post


Link para o post
Compartilhar em outros sites

mano sua classe está com problemas, de uma olhada

Microsoft Windows XP [versão 5.1.2600]© Copyright 1985-2001 Microsoft Corp.C:\WINDOWS\System32>c:C:\WINDOWS\System32>cd c:C:\WINDOWS\system32C:\WINDOWS\System32>cd c:\classeC:\classe>md binC:\classe>dir /w O volume na unidade C é CRISTIANO O número de série do volume é 3C78-C433 Pasta de C:\classe[.]        [..]        classe.vb  [bin]              1 arquivo(s)          7.034 bytes              3 pasta(s) 11.096.178.688 bytes disponíveisC:\classe>makeclassvb'makeclassvb' não é reconhecido como um comando internoou externo, um programa operável ou um arquivo em lotes.C:\classe>makeclassevb'makeclassevb' não é reconhecido como um comando internoou externo, um programa operável ou um arquivo em lotes.C:\classe>makeclasse'makeclasse' não é reconhecido como um comando internoou externo, um programa operável ou um arquivo em lotes.C:\classe>makeclassevb'makeclassevb' não é reconhecido como um comando internoou externo, um programa operável ou um arquivo em lotes.C:\classe>set indir=c:\classe\casse.vbC:\classe>set indir=c:\classe\classe.vbC:\classe>set outdir=c:\classe\bin\classevb.dllC:\classe>makeclasseC:\classe>set indir=C:\classe\classe.vbC:\classe>set outdir=C:\classe\bin\classe.dllC:\classe>vbc /t:library /out:C:\classe\bin\classe.dll C:\classe\classe.vbMicrosoft ® Visual Basic .NET Compiler version 7.00.9466for Microsoft ® .NET Framework version 1.00.3705Copyright © Microsoft Corporation 1987-2001. All rights reserved.C:\classe\classe.vb(5) : error BC30466: Namespace or type 'Data' for the Imports 'System.Data' cannot be found.Imports System.Data        ~~~~~~~~~~~C:\classe\classe.vb(7) : error BC30466: Namespace or type 'SQLClient' for the Imports 'System.Data.SQLClient' cannot be found.Imports System.Data.SQLClient        ~~~~~~~~~~~~~~~~~~~~~C:\classe\classe.vb(17) : error BC30182: Type expected.Dim conBanco = New                ~C:\classe\classe.vb(18) : error BC30188: Declaration expected.SQLConnection(System.Configuration.ConfigurationSettings.AppSettings("appCon~~~~~~~~~~~~~C:\classe\classe.vb(19) : error BC30188: Declaration expected.n"))~C:\classe\classe.vb(21) : error BC30002: Type 'SqlDataAdapter' is not defined.Dim dapAdapter As SqlDataAdapter = New SqlDataAdapter                  ~~~~~~~~~~~~~~C:\classe\classe.vb(23) : error BC30002: Type 'DataSet' is not defined.Dim dtsDataSet As DataSet = New DataSet("Granifera")                  ~~~~~~~C:\classe\classe.vb(25) : error BC30002: Type 'DataTable' is not defined.Dim dttClientes As DataTable = dtsDataSet.Tables.Add("Clientes")                  ~~~~~~~~~C:\classe\classe.vb(27) : error BC30002: Type 'SqlCommand' is not defined.Dim cmdCommand As SqlCommand = conBanco.CreateCommand()                  ~~~~~~~~~~C:\classe>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.