0
7 개의 입력란을 7 개의 텍스트 상자에 채워야합니다. 데이터는 SQL Compact DB에서 제공됩니다 ...SQL 데이터베이스에서 텍스트 상자 채우기
여기까지 내 코드가 있지만 막혀 있습니다. Form Load ...에 텍스트 상자를 채우기 위해해야 할 일은 무엇입니까?
우디
private void mcContactSubmit_Load(object sender, EventArgs e)
{
// Setup our SQL connection.
SqlCeConnection dataSource = new SqlCeConnection(
@"Data Source=|DataDirectory|\..\..\ContactInformation.sdf;
Persist Security Info=False");
SqlCeDataReader myReader = null;
// Create our command text.
string sqlQuery = String.Format(@"SELECT TOP (1) FirstName, LastName, Title,
Department, Category, Phone, Comments FROM ContactInformation
ORDER BY FirstName DESC");
// Open the SQL connection.
dataSource.Open();
SqlCeCommand myCommand = new SqlCeCommand(sqlQuery, dataSource);
myReader = myCommand.ExecuteReader();
}
덕분에 친구, 쉽게 :
도움이 더 필요한 경우
은 여기 봐. – Woody좋은 물건, 다행스럽게 도와 줬다. –
Doh. 나는 너무 빨리 말했다. 텍스트 상자가 채워지지 않습니다 ... 여기에 디버그 모드에서 표시되는 내용이 있습니다. 메시지 \t "기본 커서를 스크롤 할 수없는 경우 SQL Server Compact는 HasRows 속성에 대한 호출을 지원하지 않습니다." 도대체 무슨 뜻입니까?! LOL ... – Woody