0

错误:指定的演员表无效。这发生在内部连接代码上

string Query = "SELECT User.First, User.Last, Details.Address1, 
                       Details.Address2, Details.County, Details.Country, Code.Codenum  
                FROM User INNER JOIN Details on User.Details_DetailsID = Details.DetailsID 
                      INNER JOIN Codes on User.Code_ID = Code.ID 
                WHERE User.Last ='" + cbUsers.SelectedItem.ToString() + "'";



 string snum = myReader.GetInt32(1).ToString();
 txtcode.Text = snum;
4

1 回答 1

0

GetInt32(1)意味着您从您的阅读器获得第二列值,名为User.Last. 我认为这是姓氏,可能无法转换为Int32.

于 2013-11-04T15:54:19.810 回答