Reference Column and Row in Data View


(Shannon Kearney) #1

Can you reference a Column in a BAQ DataView as a parameter in a Dynamic Query? I don’t know what I have wrong but it is throwing an error. I don’t think I’m calling the dataView correctly.

MessageBox.Show("Change Order Number Start");
		tbOrderCancelled.Visible = false;
		tbOrderEditCompleted.Visible = false;
		MessageBox.Show("Change Order Number Lines");
		//Order Lines
		DynamicQueryAdapter dqa = new DynamicQueryAdapter(oTrans);
		QueryExecutionDataSet qeds = dqa.GetQueryExecutionParametersByID("GS_Orders_Lines");
		qeds.ExecutionParameter.AddExecutionParameterRow("OrderNum", edvMyCustomOrderDV.dataView[edvMyCustomOrderDV.Row]["OrderNum"].ToString() , "nvarchar", false, Guid.NewGuid(), "A");
		dqa.ExecuteByID("GS_Orders_Lines", qeds);
		gridLinesCopyChanges.DataSource = dqa.QueryResults.Tables["Results"];

(Jose C Gomez) #2

What’s the error?

(Shannon Kearney) #3


(Shannon Kearney) #4

It’s after the Message Box “Change Order Number Start”)

(Shannon Kearney) #5

I’m trying to change all my references to the controls to the actual BAQ DataView Columns

(Jose C Gomez) #6

That means that your


Either doesn’t exist or doesn’t have a value.

(Shannon Kearney) #7

Okay, so I am referencing it correctly?

(Jose C Gomez) #8

Seems fine but it is telling you that it doesn’t have a Row or a Value.

(Theodore Koch) #9

How is this dataview instantiated?