|
post the code where your binding the data to the datagrid. Sounds like you've assigned the data source but never bind it. Or the data source is sending you no data.
|
|
|
|
|
no code all in properties.
DATAGRID properties i set:
DATAsource: dataenvoriment1
datamember: command1
when i try to retrieve, yes the column title data show out.
when i try to run it suppose the datagrid will show some data but it's blank.
About my SQL is correct cause b4 that i use ADODC1 to link to datagrid and show the data show correctly. but when i try to use dataenviroment it not showing data out.
|
|
|
|
|
when the datagrid is needing to be displayed you'll need to execute the data command and bind the data to the datagrid. IE...
DataGrid1.DataSource = dataenvoriment1<br />
DataGrid1.DataMember = command1<br />
DataGrid1.DataBind()
|
|
|
|
|
wat do i need to type after
DataGrid1.DataBind() = ??????
|
|
|
|
|
|
have you checked you table contents ?
data is blank or not ?
and in dataenvironment->go to connection->test connection
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
|
what kind of command you are using for retrieving data ?
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
I want to read a picture in JPEG format from MS WOrd document and display it in VB, any body know how to do it ?
Thanks in advance for help !
|
|
|
|
|
try this
objWD.ActiveDocument.Shapes(ii).Select
objWD.Selection.CopyAsPicture
where objwd is object refereced to word application.
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
I have windows form (vb.net) in which i have webbrowser control. Now when i open up some web site at runtime in that form, i need to capture the onblur and onfocus events of my input boxes on an html form and perform custom external handling in my vb.net application. I have been able to successfully hook up a handler to the 'onclick' event, but the 'onblur' events are not working. Can anybody please tell me why is it happening?
i have picked up an input box and then attaching an evenhandler using
AddHandler CType(txt, mshtml.HTMLInputTextElementEvents2_Event).onblur, AddressOf Me.txt2_HTMLInputTextElementEvents_Event_onblur
and the correspoding handler is like this.
Private Sub txt2_HTMLInputTextElementEvents_Event_onblur(ByVal pEvtObj As mshtml.IHTMLEventObj)
.....................
........some code will go here .......
.....................
End Sub
|
|
|
|
|
i haveing an error while running my coding which is to pass the info from the data grid to EXCEL... it pass correctly at first but when it try to pass the last 3 row then error pops up : Runtime error '6148' invalid row number. when i try to check my excel the last print out b4 error happen,it refer to the data grid last row info which mean it try to skip to the last row... so when the system try to read next time there was no more line to read... i have check my code many time i dunno y the vb just skip the line itself....
For example again: datagrid row 10 = EXCEL row 10 but the EXCEL row 10 have print out datagrid row 20...
i = 3 'ROW<br />
j = 2 'Column<br />
For dr = 0 To (Adodc1.Recordset.RecordCount - 1)<br />
For dc = 0 To (DataGrid1.Columns.Count - 1)<br />
<big>DataGrid1.Row = dr</big><br />
DataGrid1.Col = dc<br />
ApExcel.Cells(i + 1, j).Value = DataGrid1.Text 'Pass info from data grid to EXCEL<br />
j = j + 1<br />
Next dc<br />
j = 2<br />
i = i + 1<br />
Next dr
|
|
|
|
|
use :-
For dr = 0 To (Adodc1.Recordset.RecordCount - 1)
For dc = 0 To (DataGrid1.Columns.Count - 1)
DataGrid1.Row = dr+1 ' as 0 is not a valid row
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
i run ok for the 0 which mean the first line.
when it go to the 11 line then something goes wrong with the data it will get the last value of the data. u know wat i mean? when it get the last data of the last row but which is not. when it go to the next row, there is nothing to get so error came out.
But i didnt control the VB to skip the 11 line...
|
|
|
|
|
on which line and text error occurs ?
either datagrid1.text or other ?
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
the code which i have underline it.
I know y there is an error because when i read there is no more information cause it have skip to the last line which i did not ask it to do so... so i not sure happen with the system....
when i run the system i check one by one... example, suppose it will pass 14 row with 5 column information each of it.
when it goes to row 12, then the first 2 colum data which is not the correct one the vb itself have skip to row 13-14 and get the value. after that sure it will have error becasue when it try to read the row 13, but the arrow have been point to the last 14 row b4 when it put the value to row 12, so the next data will be 15 which is an empty one.
|
|
|
|
|
campbells wrote: For dr = 0 To (Adodc1.Recordset.RecordCount - 1)
For dc = 0 To (DataGrid1.Columns.Count - 1)
DataGrid1.Row = dr
I am not entirely sure I understand your problem, but should not you put the line "DataGrid1.Row = dr" between
"For dr = 0 To (Adodc1.Recordset.RecordCount - 1)"
AND
For dc = 0 To (DataGrid1.Columns.Count - 1)"
so that the row is changed after all the columns are processed?
Hope this helps.
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
at first the DR which mean the row~ since i'm showing the data in the datagrid first, then pass to EXCEL.
DC which is the column , which there is 5 column.
when goes to row 1, then pass the datagrid column data to excel, after passing the row 1 column data, then next dr which is ROW 2.
|
|
|
|
|
try this
for dr =0 to datagrid1.rows-1
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
dc suppose to be column...??
For dc = 0 To (DataGrid1.Columns.Count - 1)
|
|
|
|
|
i m so sorry
for dr =0 to datagrid1.rows-1
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
The problem is that your assuming that a DataGrid row is the same as a Row in the Dataset. It's not. You shouldn't even be getting the data out of the DataGrid. Just use the RecordSet object as your source of data to copy to the Excel sheet. The DataGrid is just for showing and editing what's in the RecordSet, keep it that way.
Now, since you're using VB.NET, why are you using the old ADODB objects when the .NET Framework provides much better and easier to use DataSet classes?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have to deploy my application and have been instructed to use merge modules. As the client computers don't have any CR on them. However when I right click on the setup project and add merge modules. There are no msm files for crystal reports.
Can anyone tell me what should I do to add these files, so my project can be deployed and ran on the clients machines.
I am using VS.Net 2005 and Crystal Reports 10. I have been told to enter a lience key. How do I do this?
Thank in advance,
Steve
-- modified at 22:44 Sunday 29th October, 2006
|
|
|
|
|
|
Hello there,
I have a VB app that creates and runs MS PowerPoint 24/7. When I first started, the application runs Ok as I expected, but then sometime the COM's error from MS PowerPoint throw an exception such as "PowerPoint currently experiencing the problem. We are sorry for the inconvenience, bla, bla... Click Ok to restart the MS PowerPoint", and the system is hung till user must click Ok to dismiss the error dialog box. Since this application runs 24/7 so in the middle of the night, there is noone there to click the OK button to restart the PowerPoint.
I am trying every posible ways to prevent this error to show up such as kill the PowerPoint Object and reinstantiate, reboot host if error happen... Howerver, none of my code worked since the system was hung unexpectedly because MS PowerPoint throw the error and system was hung before the pointer returned back to my code.
I am wondering if there is any way I can sense the error message from PowerPoint and prevent it before it shows up as the error dialog box. Or is there any way I can send code to click the Ok button to dismiss the error diaglog box. Please give me some advice where to start, or point me to some direction. I know there are messages que but I don't know how to access them and how to find the ID of the error windows. I am totally lost in this part now. Please give some advice.
thanks in advance for reading this message
Paula
|
|
|
|