i'm trying a 3d party tools Query Future | Entity Framework Plus[^]
But i'm not sure if it's true what this tool claim to do ?
The sql profiler it says : exec sp_executesql N'---EF+ Query Future 1 of 5....... .After there are 5 queries (I have 5 query that are executed with Future)
But i don't know if these queries are executed in a single database hit ?
I'm using Entity Framework 6 with sql server 2008r2 database.
I want to get from database only those records that have vl1>5.( i need to get from database only those objects that have vl1>5 and not to read all the objects and after to apply the condition )
I have 2 queries :
Dim query1 as IeQueryable(of myobj)= (From t in context.myobjs Where vl1<5).Tolist
Dim query2= (From t in context.myobjs.Asqueryable Where vl1<5).Tolist
Are these queries doing the same job that i want ?
and not to read all the objects and after to apply the condition )
Then use an SQL query and execute your statement on the server, instead of using an ORM.
The only difference between the first and second version is the "Asqueryable" part in the second statement; that statement has nothing to do with "where" the query executes. So, to answer, yes, they're doing the same job. Not sure if it's what you want though.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
can someone help me fix my code? i'I'm having problem deserializing the xmlcode save on my database. i can save FMD on database by using Fmd.SerializeXML() but when i'm going to extract record on database i use Fmd.DeserializeXML() but i'm having error. I'm stuck with it.
here is my code.
Public Sub OnVerify(ByVal captureResult As CaptureResult)
' Check capture quality and throw an error if bad.
If Not Me.CheckCaptureResult(captureResult) Then Return
SendMessage(Action.SendMessage, "A finger was captured.")
Dim resultConversion As DataResult(Of Fmd) = FeatureExtraction.CreateFmdFromFid(captureResult.Data, Formats.Fmd.ANSI)
If resultConversion.ResultCode <> Constants.ResultCode.DP_SUCCESS Then
Me.Reset = True
Throw New Exception("" & resultConversion.ResultCode.ToString())
firstFinger = resultConversion.Data
'PULL FINGERPRINT RECORD FROM DATABASE
Dim FMDDataset As New DataSet
Dim DBconn As MySqlConnection = New MySqlConnection(connString)
Dim sql As MySqlCommand = New MySqlCommand("SELECT * " & _
" FROM tbl_fr ", DBconn)
Dim DataAdapter As MySqlDataAdapter = New MySqlDataAdapter()
DataAdapter.SelectCommand = sql
If FMDDataset.Tables("tbl_fr").Rows.Count > 0 Then
Dim counter As Integer = 0
Dim fp1, fp2 As String
fp1 = Fmd.SerializeXml(resultConversion.Data)
Dim byteS As Byte()
'data from database
byteS = FMDDataset.Tables("tbl_fr").Rows(0).Item("frp")
'im having error on this line of code
'DP_INVALID_PARAMETER: Data at the root level is invalid. Line 1, position 1.
MatchFinger = Fid.DeserializeXml(Convert.ToString(byteS))
Dim resultConversionDATA As DataResult(Of Fmd) = FeatureExtraction.CreateFmdFromFid(MatchFinger, Formats.Fmd.ANSI)
Dim idResult As DPUruNet.IdentifyResult = DPUruNet.Comparison.Identify(firstFinger, 0, "resultConversionDATA", 2147, 2)
If (idResult.ResultCode = DPUruNet.Constants.ResultCode.DP_SUCCESS) Then
If (idResult.Indexes.Length >= 1) Then 'Found potential match, dont search second collection (speed optimized)
counter = counter + 1
Me.BindingContext(FMDDataset, "tbl_fr").Position += 1
Loop While (counter <= FMDDataset.Tables("tbl_fr").Rows.Count)
I am really stuck on this one. I have ObjXmlSimpleTypeDoc object which have two EnumerationValues. Each of EnumerationValue have child nodes.
I want to got values from child nodes of the correct EnumerationValue node.
To find the correct EnumerationValue I use the value in the variable strCourtNCIC. If the value in strCourtNCIC matches a EnumerationValue @code, that is the EnumerationValue I need. For this question strCourtNCIC hold a value MN010015J.
How do I do this in VB.NET?
Here is the objXmlSimpleTypeDoc object where I need to find EnumerationValue with @code = strCourtNCIC (MN010015J)
I need help with something. I am preparing a project. I couldn't decide how to make a feature I wanted. I will be glad if you help me.
My project will be as follows;
I have 3 datagridview in Form1 and this datagridview is connected to each other with primary key. While loading the form, the data is loaded into the datagridview and I add a button with the code to the last column in the datagridview. When I click the button on any line, Form2 opens and loads the data in this form and connected to the primary key with 2 datagridview. This data is another table in the same database. I'm adding checkboxes to these datagridview. then I mark some records in datagridview, which are main and sub-table data, and when I press the close form button, it returns to Form1 and the selected data is saved to the tables to which the 2nd and 3rd datagridviews are connected by checking the duplicate records. When the installation is complete, the image in all datagridviewers is refreshed.
Note: I can't add a sample project here because I haven't started coding yet.
Thanks for your help.
My English is not very good. I wrote the message using Google Translate. If there is an error, it is the error of the Translation program. I have codes for my project. but I was a bit confused with the code I wrote in order to do the operation I specified in my message. therefore I asked for help with the method. I keep working on it. Thank you for your interest.
Note: This is a Google translation.
Public Sub saveBookingData()
boolSave = False
Dim rsSave As New ADODB.Recordset
sSQL = "Select * From Student_tbl Where RegNo = '" & strEmpID & "' "
.Open(sSQL, cn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
If .EOF Then
rsSave.Fields("RegNo").Value = strEmpID
rsSave.Fields("Student_Name").Value = txtName.Text
rsSave.Fields("Father_Name").Value = txtFather.Text
rsSave.Fields("City_Name").Value = comCity.Text