【发布时间】:2012-04-28 09:56:23
【问题描述】:
我正在使用 Visual Studio(VB),但遇到了问题,
我正在使用 Microsoft.Office.Interop.Excel 从 excel 中读取数据,
--Students_Table--
id_S | Name | Sex
12 john M
---Excel file------
name | address
john NY
-----上传的excel文件保存的表格--
id_u | id-S | Scor |
1 12 30
我想从“John”(excel 文件)中获取 Id_S,我尝试使用带有查询的数据集
select Id_P from Students_Table where (Name =: Name)
然后检查fillBy & GetBy
我的vb代码:
Dim ta As New Students_TableAdapters.StudentsTableAdapter
Dim DataID as Integer
if ta.fillBy(ExlRead.Value) <> 0 then
DataId = ta.fillBy(ExlRead.Value)
else
exception("The Name Cannot Found on Database")
end if
我使用断点检查这些,我发现了一条错误消息
“ORA-01722:无效号码”
(我用的是oracle数据库)
如果我将光标指向ta.fillBy,它会显示Public Overridalle Overload Function FillBy(Name as string) as decimal?
注意: 我是新手 使用 Oracle 数据库
【问题讨论】:
-
感谢@arion 纠正观点