目前正在尝试将外键应用于我创建的表,但我收到了SQL错误:
SQL Error: ORA-02270: no matching unique or primary key for this column-list
02270. 00000 - "no matching unique or primary key for this column-list"
*Cause: A REFERENCES clause in a CREATE/ALTER TABLE statement
gives a column-list for which there is no matching unique or primary
key constraint in the referenced table.
*Action: Find the correct column names using the ALL_CONS_COLUMNS
catalog view
Run Code Online (Sandbox Code Playgroud)
我在这里离开的地方有很大的损失,我认为每个人都有秩序,但我不能指出什么是错的.
以下是我正在使用的相关创建和更改脚本,如果有人可以指出我出错的地方:
创建结果和兴奋剂测试:
CREATE TABLE Results
(
RaceID NUMBER,
HorseID NUMBER,
JockeyID NUMBER,
Position numeric(2)
);
CREATE …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用访问数据库中的项目填充VB.net中的Listview。
到目前为止,我已经设法用我想要的所有项目填充它,但是我需要在右列下的项目。(用户和评论)
这是所有相关代码:
Dim count As Integer
Dim comments As New DataSet
comments = GetComments(classid)
With CommentsView
.View = View.Details
.Columns.Add("User")
.Columns.Add("Comment")
End With
count = CountRecords() - 1
For i As Integer = 0 To count
CommentsView.Items.Add(comments.Tables(0).Rows(i).Item(2))
CommentsView.Items.Add(comments.Tables(0).Rows(i).Item(3))
Next
Run Code Online (Sandbox Code Playgroud)
所以从本质上讲,我希望用户下的Item(2)和评论下的Item(3)。有任何想法吗?
谢谢。