| | |
Data not showing up in DataGrid
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2006
Posts: 88
Reputation:
Solved Threads: 0
Hi guys! Long time no see!
I'm trying to get a datagrid to work, but although when I run it there is no error, nothing appears on the datagrid. Yet, there seems nothing wrong with my code:
Thank you for your help
I'm trying to get a datagrid to work, but although when I run it there is no error, nothing appears on the datagrid. Yet, there seems nothing wrong with my code:
VB.NET Syntax (Toggle Plain Text)
SQL = "select * from upload " & _ "where field003 like 'P'+'%'+'" & PONo & "' " & _ "and field009 like 'Being received' order by field003" 'Set up connections Dim SQLCommand = New SqlCommand(SQL, conn) conn.Open() Dim da As SqlDataAdapter = New SqlDataAdapter(SQLCommand) Dim ds As New DataSet da.Fill(ds, SQL) 'Attach dataset to datagrid dgBlowOut.DataSource = da
Thank you for your help
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
The dataset table, not the sql table
VB.NET Syntax (Toggle Plain Text)
Dim ds As New DataSet("uploads") .... dgBlowOut.DataMember = "uploads"
•
•
Join Date: Sep 2006
Posts: 88
Reputation:
Solved Threads: 0
I have also realized that in trying to run this application, after a while this error appears:
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this error may be caused by the fact that under the default settings SQL Server does not allow remote connections."
I had never seen this error before this time because when I clicked the View button and it did not change the datagrid, I would have closed it immediately..... it came up after about 4 seconds.
Does this help anyone to assist me?
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this error may be caused by the fact that under the default settings SQL Server does not allow remote connections."
I had never seen this error before this time because when I clicked the View button and it did not change the datagrid, I would have closed it immediately..... it came up after about 4 seconds.
Does this help anyone to assist me?
Last edited by bajanpoet; Aug 21st, 2008 at 1:02 pm.
•
•
Join Date: Sep 2006
Posts: 88
Reputation:
Solved Threads: 0
the Dataset is using a raw SQL statement that is being stored in a string variable SQL -
I don't understand what the dataset table is...
VB.NET Syntax (Toggle Plain Text)
SQL = "select field003 as 'PO #',field009 as 'Status' from upload " & _ "where field003 like 'P'+'%'+'" & PONo & "' " & _ "and field009 like 'Being received' order by field003" .....
I don't understand what the dataset table is...
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
As long as you are sure the the datasource is correct and you can 'ping' the server then you need to configure the sql server to allow tcp ip connections.
Here's some links to show you how
http://www.datamasker.com/SSE2005_SCM1.htm
http://www.datamasker.com/SSE2005_SAC.htm
Here's some links to show you how
http://www.datamasker.com/SSE2005_SCM1.htm
http://www.datamasker.com/SSE2005_SAC.htm
![]() |
Similar Threads
- how to get a value from datagrid (C#)
- Datagrid not showing database value (VB.NET)
- How can I access the datagrid data with javascript. (JavaScript / DHTML / AJAX)
- Datagrid Problem!!!!!!! (VB.NET)
- Datagrid view using parameters(Plz help) (VB.NET)
- Datagrid to draw a table (C#)
- How will I Capture this Dynamic Data (ASP.NET)
- Frameset,Showing loading..Please wait message (ASP.NET)
Other Threads in the VB.NET Forum
- Previous Thread: Factorial Calculate
- Next Thread: Please Help ,...its urgent
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array basic bing button buttons center check code combobox component crystalreport data database datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog filter folder ftp generatetags google gridview hardcopy images input insert intel internet listview mobile monitor ms net networking objects output panel passingparameters peertopeervideostreaming picturebox picturebox1 port position print printing problem problemwithinstallation project read remove save searchbox searchvb.net select serial shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year






