Dim verilaDataAdapter1 As SqlCeDataAdapter
Dim verilaDataAdapter2 As SqlCeDataAdapter
Dim iliski As DataRelation
Dim Sorgu1 As String
Dim Sorgu2 As String
Dim A1Dataset As DataSet
Dim parametre1 As SqlCeParameter
Dim parametre2 As SqlCeParameter
Dim ssceconn As New SqlCeConnection("Data Source =\Program Files\AtisoftDA\atisoft.sdf")
ssceconn.Open()
Dim sqlInsertRow As SqlCeCommand = ssceconn.CreateCommand()
Sorgu1 = "SELECT * FROM StokKartTbl WHERE StokGrupKodu like @.StokGrupKodu Order By Stokismi ASC;"
Sorgu2 = "SELECT * FROM SarzKartTbl WHERE SarzID like @.Sarzid"
A1Dataset = New DataSet
verilaDataAdapter1 = New SqlCeDataAdapter(Sorgu1, ssceconn) 'StokkartTbl
parametre1 = New SqlCeParameter("@.StokGrupKodu", SqlDbType.NText, 25)
parametre1.Value = Trim(Mid(CBStGrupAciklama.Text, 1, 6)) + "%"
verilaDataAdapter1.SelectCommand.Parameters.Add(parametre1)
verilaDataAdapter1.Fill(A1Dataset, "StokKartTbl")
verilaDataAdapter2 = New SqlCeDataAdapter(Sorgu2, ssceconn) 'SarzKartTbl
parametre2 = New SqlCeParameter("@.Sarzid", SqlDbType.NText, 50)
parametre2.Value = Trim(Mid(CBSarzID.Text, 1, 25)) + "%"
verilaDataAdapter2.SelectCommand.Parameters.Add(parametre2)
verilaDataAdapter2.Fill(A1Dataset, "SarzKartTbl")
Dim p As DataColumn
Dim c As DataColumn
p = A1Dataset.Tables("StokKartTbl").Columns("StokID")
c = A1Dataset.Tables("SarzKartTbl").Columns("StokID")
iliski = New DataRelation("Elemanlar", p, c)
A1Dataset.Relations.Add(iliski)
DataGridStokKartTbl.DataSource = A1Dataset.Tables("StokKartTbl")
'Error
System.ArgumentException was unhandled
Message="Hata iletisi i?eren iste?e ba?l? bir kaynak derlemesi bulunamad???ndan bir hata iletisi g?rüntülenemiyor"
StackTrace:
System.Data.ConstraintCollection.AddForeignKeyConstraint()
System.Data.ConstraintCollection.Add()
System.Data.ConstraintCollection.Add()
at DataSetRelationCollection.AddCore()
System.Data.DataRelationCollection.Add()
AtisoftDA.siparis.Button2_Click()
System.Windows.Forms.Control.OnClick()
System.Windows.Forms.Button.OnClick()
System.Windows.Forms.ButtonBase.WnProc()
System.Windows.Forms.Control._InternalWnProc()
Microsoft.AGL.Forms.EVL.EnterMainLoop()
System.Windows.Forms.Application.Run()
AtisoftDA.siparis.Main()
Hi AtiSoft,
Looks like the community did not really understand your problem or the post semantics made them to show less interest in this thread. If you are still facing the problem, I would request you to post a new query with a detailed problem description than just the program dump!
Thanks,
SQL Server Mobile/Everywhere Forum Moderator
No comments:
Post a Comment