I am not sure what you mean by "Can you verify that the dataset is empty, "before" you execute the query"?
The result of the query is loaded into a dataset; that's an object that gets created somewhere, and it might already contain data - since the query looks correct, I'm wondering where these other records came from, and it might be that they were there before the query executed.
I doubt that this is the problem, as the object "should" be replaced with a new one on the line where the query executes;
Set myRecordSet = ...
This query would always give the output of records a1 and b1 but how can i build a search criteria for the client side, if the user enters "us" in the search criteria, it would show record "e1" or the id the user enters "00", it would show an error saying to "try again, no record found", or if the user searches "3" in the criteria, it would show records "a1, b1 and c1" and so on.
We verified the query yesterday, and it is correct. The ASP-code looks correct too, meaning that it places the user-input in the right spot.
The code below should print the query that's being built in the output-window of the VS-IDE. You might want to check whether the generated query looks as expected (I see no reason why not) and whether it runs when you execute it directly on the server.
'check for a matchDim myQuery AsString = "SELECT * FROM dbo.tt WHERE cusip LIKE '%" & searchInput & "%' OR isin LIKE '%" & searchInput & "%'"
Set myRecordSet = Connect.Execute(myQuery)
If all else fails, I'll debug it in the weekend. Already got the query and the relevant piece of ASP, so I could try and build it.
So, I'm making a webbrowser with tabs, and so I'm using the
Dim browser AsNew Webbrowser
function. I had the dock property on fill, so that it would fill the tabcontrol. However, I had a statusstrip docked at the bottom of the tabcontrol. When the webbrowser was docked to fill the tabcontrol, it covered up the statusstrip. How do I make it not do this?
You can have a panel in tab control and keep status strip out side the Panel but in the Tab control and then add your web browser in panel and set property dockable.. May be this will solve your proble..
Can't figure this out . . . .
I am trying to run a .Compute against a dataTable but am getting an 'EvaluateExecption was unhandled' error: Cannot perform '<' operation on System.String and System.Double.
Here is my code:
Dim salesTable as DataTable
salesTable = New DataTable
Public Sub getYrSales(ByVal stn As String)
Dim yrSales = salesTable
Dim x0 As Object = yrSales.Compute("SUM(extPrice)", "shipToName = '" & stn & "'" & "AND invDate >" & begDate & "AND invDate <" & endDate)
In your Compute, you've got "AND invDate < endDate". Apparently, your invDate column datatype is either String or Double and the endDate variable you're passing in contains data of the other type. Compute will NOT do automatic type conversion to coerce the compare to work, so YOU have to make sure you're storing data appropriately, like NOT storing dates in the database as strings or non-date types.
It's impossible to say for sure because you haven't shown the column definition for invDate nor do we know what type and the contents of the endDate variable.
Thanks for the feedback - I have made the following changes:
Dim salesTable As DataTable
salesTable = New DataTable
Dim col_invNo As DataColumn = New DataColumn("invNo")
col_invNo.DataType = System.Type.GetType("System.String")
Dim col_custId As DataColumn = New DataColumn("custId")
col_custId.DataType = System.Type.GetType("System.String")
Dim col_custName As DataColumn = New DataColumn("custName")
col_custName.DataType = System.Type.GetType("System.String")
Dim col_shipToId As DataColumn = New DataColumn("shipToId")
col_shipToId.DataType = System.Type.GetType("System.String")
Dim col_shipToName As DataColumn = New DataColumn("shipToName")
col_shipToName.DataType = System.Type.GetType("System.String")
Dim col_shipToCity As DataColumn = New DataColumn("shipToCity")
col_shipToCity.DataType = System.Type.GetType("System.String")
Dim col_shipToState As DataColumn = New DataColumn("shipToState")
col_shipToState.DataType = System.Type.GetType("System.String")
Dim col_invDate As DataColumn = New DataColumn("invDate")
col_invDate.DataType = System.Type.GetType("System.DateTime")
Dim col_category As DataColumn = New DataColumn("category")
col_category.DataType = System.Type.GetType("System.String")
Dim col_itemId As DataColumn = New DataColumn("itemId")
col_itemId.DataType = System.Type.GetType("System.String")
Dim col_desc As DataColumn = New DataColumn("desc")
col_desc.DataType = System.Type.GetType("System.String")
Dim col_shipQty As DataColumn = New DataColumn("shipQty")
col_shipQty.DataType = System.Type.GetType("System.Int32")
Dim col_extPrice As DataColumn = New DataColumn("extPrice")
col_extPrice.DataType = System.Type.GetType("System.Decimal")
Public getYrSales(ByVal stn as String)
Dim begDate as Date
Dim endDate as Date
Dim yrSales = salesTable
Dim x0 As Object
begDate = "01/01/2009"
endDate = "12/31/2009"
This is by design, for security reasons. They won't work because you'll be giving the "Normal" process access to code running under an account that has elevated permissions. If there was some exploit in the elevated code, it could then be taken advantage of and potentially harmfully to the system, i.e.: virus.
how can i add the serial number function to my project
and that serial could acces for one time like any professional software
Generating a serial number isn't enough; one needs to be able to validate it. That means that you'd need a number that contains a hash, a number that can be calculated, or a number (or sequence of letters) that can be tracked (say, using a database).
If you're unsure what to do, google for "Licensing example C#".
I'm new to VB.net and totally new to XML. I am building a program that receives a response to a XML inquiry from hwresponse.GetResponseStream. So far I have been able to submit the request and receive a response. I now need take that response (in the form of a string) and convert it to a format which will allow me to make decisions based on it. Perhaps by creating dataset/datatable and passing to variables.
I've spent days Googling an can't find anything in VB.net that fits. I know this is down to my lack of knowledge and a tiny brain. I would be eternally grateful to anyone who could help.