Fórum DMSII com CSHARP #448127
08/07/2013
0
Abaixo tem o trecho de código (C#) que efetua acesso, lembrando que os caracteres "*" foram colocados parra a segurança:
OleDbConnection con = new OleDbConnection(@"Provider=Unisys.DMSII; DATABASE=banco;UID=***;HideChapters=FALSE;ConcealIndexes=FALSE;Normalize=FALSE;BlobpathLogon=FALSE;Physicaldbonly=FALSE;PWD=?;HOST=****;PORT=****");
con.Open();
OleDbCommand command = new OleDbCommand();
command.Connection = con;
command.CommandType = System.Data.CommandType.Text;
command.CommandText = "SELECT * FROM pccb01"; ///---> AQUI O PONTO DE FALHA, SE TROCAR A INSTRUÇÃO APENAS POR "pccb01" funciona.
OleDbDataReader reader = command.ExecuteReader();
while (reader.Read())
{
Console.WriteLine(" - ", reader[0], reader[1]);
}
reader.Close();
con.Close();A instrução acima retorna a seguinte mensagem de ERRO:
[2098] Command may not be table name: SELECT * FROM pccb01
Alguém pode me ajudar?
Hector Figueroa
Curtir tópico
+ 0Posts
08/07/2013
Alexandre Machado
Gostei + 0
08/07/2013
Hector Figueroa
Gostei + 0
08/07/2013
Hector Figueroa
Gostei + 0
18/11/2016
Marcos Vinicius
Gostei + 0
18/11/2016
Marcos Vinicius
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)