Jump to content
Xtreme .Net Talk

tanai

Members
  • Posts

    3
  • Joined

  • Last visited

tanai's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Chester, The easiest, it is use MS Access to set it up. :p The hard way, I think it is to use ADOX to set the permission. However, in my point of view, if I have to use ADOX, I 'd better use ADOX to get table name and schema directly. That would be easier. Cheers, Tanai
  2. Dear /Kejpa, Thank you very much for your advice. The problem does come from the access right. I have just known that userid "admin" does not have access right to those system tables by default eventhough it can browse the system table in MS Access directly. Have a nice day! Tanai
  3. Hello! I am trying to get Table Name from Access database by using ADO.NET. Here is the code that I used. After run, it appears error as "An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll" Dim DataCommand As OleDbCommand Dim DataReader As OleDbDataReader DataCommand = New OleDbCommand DataCommand.Connection = DataConnection DataCommand.CommandType = CommandType.Text DataCommand.CommandText = "SELECT * FROM MSysObjects Where Type=1 and Flags=0" DataConnection.Open() DataReader = DataCommand.ExecuteReader If DataReader.HasRows Then MsgBox("OK, there are some tables!") Else Msgbox("There is no table!") End If DataReader.Close() If I change the table from MSysObjects to be other regular tables, it works fine. So, I am wondering if ADO.NET can be used to access to the system table or not. Or What I have been doing wrong? Would you please help advice? Thank you very much. Tanai
×
×
  • Create New...