229 Posted Topics

Member Avatar for OMER AHMED

Hi I downloaded that example from MSDN and the difference that I can see is that the author has added 26 columns (A through Z) and set the View property of the ListView to Details. I downloaded your code, added a ListView and did the above and it works fine. …

Member Avatar for OMER AHMED
0
1K
Member Avatar for PinoyDev

Hi Enclosing the field names in square brackets [] within the sql statement will allow you to create them without the need for quote characters. Having said that, it is not good practice to have field names contain characters such as "/". Is there not a better naming convention you …

Member Avatar for PinoyDev
0
145
Member Avatar for bonzo2008

Hi If this is a true ini file that could contain more than one value or section then you should consider using the API's that were created for managing ini files such as GetPrivateProfileString and WritePrivateProfileString. Check out this tutorial on [working with ini files](http://www.vbexplorer.com/VBExplorer/focus/ini_tutorial.asp) for more information and examples. …

Member Avatar for bonzo2008
0
259
Member Avatar for SaneleSHaBbA

What software? Do you literally mean VB.NET? If so, take a look at [this Wikipedia entry for a brief explanation and history](http://en.wikipedia.org/wiki/Visual_Basic_.NET), otherwise, please provide more information.

Member Avatar for djjeavons
0
63
Member Avatar for coder91

Hi Could the second stored procedure that returns the data not return the data in the same format (i.e. same column headers) so that you can simply bind the DataSet to the DataGridView? Otherwise, another option would be to loop through the returned data in the first data table and …

Member Avatar for tinstaafl
0
164
Member Avatar for OMER AHMED

Hi I am assuming this is a design time error and not a run time error judging by my quick bit of research on Google. I am sure there are a number of reasons why this might be caused so it is difficult to offer a solution just based on …

Member Avatar for Santanu.Das
0
290
Member Avatar for jez9

Hi Unfortunately you cannot just set the background image property to the return value of reader("pic") whcih I assume at this point is a byte array (if you have saved the image to an Ole Object field). Instead, you first need to convert the value of reader("pic") to a byte …

Member Avatar for Reverend Jim
0
704
Member Avatar for asmitap

Hi Not sure what you mean by: > but i want fix number of tables in combobox which changes is require in this query? Can you elaborate further please.

Member Avatar for djjeavons
0
71
Member Avatar for Violet_82

Hi Are you trying to show the Total price for all Londoners? If so, the SQL would be different, something like: `SELECT SUM(Price) AS TotalPriceForLondon FROM transactions WHERE Town='London'` Then in your code you can use the TotalPriceForLondon column name which has been created using the AS keyword. In your …

Member Avatar for Violet_82
0
170
Member Avatar for Violet_82

Hi You could use the PIVOT function to create a CrossTab table so that your Rent, Car, Food and Bills becomes columns. Then you can simply read the data into your program as standard. SELECT Rent, Car, Bills, Food FROM ( SELECT dbo.expenseCode.ExpenseType, dbo.expenses.Cost, dbo.expenses.Date FROM dbo.expenses INNER JOIN dbo.expenseCode …

Member Avatar for Violet_82
0
306
Member Avatar for jessica_10

Hi Not sure I understand your question. Are you saying that if you click btnSnacks then you want to hide btnDrinks and if you click btnDrinks you want to hide btnSnacks? Although how that would work I am not sure as one will be visible while the other would not. …

Member Avatar for JZZZ
0
236
Member Avatar for blueguy777

Hi The following SQL should work but tested in SQL Server, not MySQL. SELECT derivedtbl_1.cardNo, derivedtbl_1.regName, dbo.mainsubagent.firstName + ' ' + dbo.mainsubagent.lastName AS mainAgentName, mainsubagent_1.firstName + ' ' + mainsubagent_1.lastName AS subAgentName, derivedtbl_1.installmentAmt FROM (SELECT p.cardNo, p.regName, p.installmentAmt, r.mainAgentId, r.subAgentId FROM dbo.payment AS p INNER JOIN dbo.registration AS r ON …

Member Avatar for 1stDAN
0
352
Member Avatar for mark261511

Hi Is the client database and server database using the same database technology> For example, are they both SQL Server? Does the client have access to the server database? Does the copy need to be done via code or can it be done via some for of Data Transformation Service …

Member Avatar for James E
0
271
Member Avatar for Xiao_1

Hi Not 100% sure what you are trying to do but I did notice some errors in your SQL statements. Your INSERT statement should look like: `INSERT INTO tbl_studentadm (TimeIn, TimeOut) VALUES ('" & txtadmno.Text & "', '" & txtcard.Text & "')"` Your update statement is also wrong but I …

Member Avatar for Xiao_1
0
167
Member Avatar for leyla

Hi A couple of things: 1. Student ID, is this a numerical value in your database? I believe it is and if I am correct then your query does not need to use the ' characters as these are for strings. So change your query too: `"SELECT * FROM Subjects …

Member Avatar for leyla
0
162
Member Avatar for Xiao_1

Hi If no item is selected in the ListBoxassign then you will receive a NullReferenceException error. You need to check that an item is selected before trying to use it: `If ListBoxassign.SelectedItem IsNot Nothing Then` HTH

Member Avatar for Santanu.Das
0
173
Member Avatar for leyla

Hi Are you sure that you are returning a value? Try adding: `MessageBox.Show(cmd.ExecuteScalar().ToString` Before assiging it to the Text Box to see if a value is actually returned. HTH

Member Avatar for leyla
0
1K
Member Avatar for Nova6112

Hi I don't mean to come across as rude but your statement about Format and quotation marks is incorrect. In fact, for Access the # character should be used for date formats, ' character for strings and nothing for numbers. With regards to Format, it can be used to prepare …

Member Avatar for Nova6112
0
130
Member Avatar for Violet_82

Hi You are correct in that the error is caused because you are attempting to insert a record into your expenses table without a related record existing in your expense_code table. Your expense_code table is commonly referred to as a Lookup table as it contains values that will be used …

Member Avatar for djjeavons
0
3K
Member Avatar for Salvius12

Hi A couple of things to note. Firstly, the syntax for getting the Desktop Directory is slightly off as you are calling GetFolderPath twice whereas it only needs to be done once as in: `Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory))` This is the reason you are getting the Exception as the GetFolderPath expects an Integer …

Member Avatar for djjeavons
0
759
Member Avatar for CodingSource

Hi You state that your DataGridView is data bounded. If it is bound to a DataTable then you could use the following lambda statement to count the occurrences of a given value. For example: Dim dt As DataTable = CType(DataGridView1.DataSource, DataTable) Dim count As Integer = dt.AsEnumerable().Count(Function(dr) dr.Field(Of String)("Animal").Equals("Cat")) HTH

Member Avatar for djjeavons
0
372
Member Avatar for CodingSource

Hi Your syntax is a little wrong as you are not closing the string for the SQL statement. It should be: Dim da As New OleDbDataAdapter("SELECT * from EncodingComplete where Date_Bill BETWEEN @startDate AND @endDate AND Client like @client Order by Date_Bill desc", con) HTH

Member Avatar for Reverend Jim
0
1K
Member Avatar for coder91

Hi If it is just standard data that you want to export to Excel, have you considered just exporting the data to a CSV file which the user can then open in Excel. Alternatively, if you want to create sophisticated Excel files then I can recommend [Aspose Cells](http://www.aspose.com/.net/total-component.aspx) which I …

Member Avatar for coder91
0
112
Member Avatar for CodingSource

Hi Do you want to include the DateRange within your SQL statement? If so, you could use the BETWEEN operator, for example: `SELECT * FROM EncodingComplete WHERE YourDateField BETWEEN #01/01/2010# AND #01/01/2011#` Note, depending on the database you are using you may need to substitue the # character with a …

Member Avatar for CodingSource
0
772
Member Avatar for jean_5

Hi Do you want to assign the date to the variable column? If so you would do something like: `var column = list[1].Date;` HTH

Member Avatar for Troy III
0
128
Member Avatar for AntonyRayan

Hi Do you literally want to create your own or could you use one of the multitude of available calendars that already exist. For example: * [FullCalendar](http://fullcalendar.io/) * [jQuery Datepicker](http://jqueryui.com/datepicker/) HTH

Member Avatar for AntonyRayan
0
86
Member Avatar for LukeJWhitworth

Hi Are you referring to a MonthCalendar control for Windows Forms? If so, you have a SetDate method that you can use to specify the date that should be selected. If you combine this with the SelectionEnd property (this property specifies the last date selected - so if a range …

Member Avatar for LukeJWhitworth
0
104
Member Avatar for jean_5

Hi When outputting the value of the DateTime you can use the ToString method and pass a format string. For example: Console.WriteLine(Date.ToString("dd/MM/yyyy hh:mm:ss")); HTH

Member Avatar for djjeavons
0
1K
Member Avatar for jean_5

Hi Why would you need to do this? If your database table states that DateOfBirth is a datetime field then it will be a datetime value. Are you looking to validate input data before saving it to the database? Anyhow, I am not an expert in Javascript but I don't …

Member Avatar for jean_5
0
385

The End.