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?
Hi... 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..
Hi All, 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 With salesTable .Columns.Add("invNo") .Columns.Add("custId") .Columns.Add("custName") .Columns.Add("shipToId") .Columns.Add("shipToName") .Columns.Add("shipToCity") .Columns.Add("shipToState") .Columns.Add("invDate") .Columns.Add("category") .Columns.Add("itemId") .Columns.Add("desc") .Columns.Add("shipQty") .Columns.Add("extPrice") End With
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) End Sub
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.
I am having issues with Viewing report that I added to my project and I need your help please.
I am using Access DB, VB 2010, .NET4.5 and As you can tell I am in learning process, so I am new to VB. Any help given is highly appreciated.
HERE are the Two error I am getting: 1 st one. I want to view Total Profits for all times. Error "A data source instance has not been supplied for the date source 'AllTimeReportDataset'
I named this on the wizard when I was creating the report wizard but how do I add the data source.
2nd Error: Happens when I want to view Total profits between two Date: HERE is the Error: The Report definition for the report 'TBS.TotalProfitsBetweenTwoDates.rdlc' has not been specified.
Here is my code:
Private Sub ShowReportBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowReportBtn.Click If ReportComboBox.Text = "Total Profits for all Times" Then
'Fill the information for the report Selected.
Dim TA As New TBSDSTableAdapters.TotalProfitForALLTimeTableAdapter Dim SelectedDS As New TBSDS TA.Fill(SelectedDS.TotalProfitForALLTime)
'Clear previous report run (Data Source) and Display the new report selected
'Create a new Data Source now ---selected report from Combo box ---In this case Total report for all time 'Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("TBS_TotalProfitForAllTime", SelectedDS.TotalProfitForALLTime)
Dim rds As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource
ElseIf ReportComboBox.Text = "Total Profits between two Date" Then
Dim TA As New TBS_RestDSTableAdapters.TotalProfitForALLTimeTableAdapter Dim SelectedDS As New TBSDS TA.FillByFilteringBetweenTwoDates(SelectedDS.TotalProfitForALLTime, DateTimePicker1.Value, DateTimePicker2.Value)
'Clear previous report run (Data Source) and Display the new report selected
'Create a new Data Source now ---selected report from Combo box ---In this case Total report for all time ''''Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("TBS_TotalProfitForAllTime", SelectedDS.TotalProfitForALLTime)
Dim rds As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource rds.Name = "TBS_TotalProfitForAllTime" rds.Value = SelectedDS.TotalProfitForALLTime
'tell the report control to use the data source 'also use the report template created (rds)
sir actually my main aim is to call the notepad .exe in the system using parallel port. for that i thought i will arrange an ir interrupt to the parallel port and the parallel port which is connected to the system. In the system using the vb script and interfacing the parallel port with it can help me in calling the notepad.exe file Now i am not knowing how to write the program in the vb script...plz plz plz help me..
You can concatenate all the values in the textboxes and insert them into a column. Or delimit them with a character and insert them. Either way you can only have one piece of information inside a column.
Calls the method "IsMatch" on the Regex class (from the "System.Text.RegularExpressions" namespace), with the arguments of the current keycharacter (provided by an event you did not copy/paste) and a RegEx. Then it inverses the outcome.
Not very helpful, is it? It compares a key with a RegEx and reports whether they match. You'd have to look up the "\\d+" part on this page[^] from MSDN, I don't know the regex-code from my head.
my youtube video downloader app was working but it stopped working due to Dec-2012 YouTube changes. my code is unable to load the download format. Currently, the video info loads but the application is unable to load the available download formats and download the video.
Download the VB6 Source here http://www.abhisoft.com/misc/UTubeVB6.zip
I hope anyone is able to take a look at the code and see what's wrong? I think the error is in here: