|
|
Below my DropDownList bound with a Department table.Following Output iam getting,IT,CSE,Mech-these all from table.but i want an "ALL" text also there in list box..How come this possible?
Sub bindDtgrid()<br />
With dtgEmplList<br />
.DataSource = myDataSet<br />
.DataMember = myDataSet.Tables(0).TableName<br />
.DataBind()<br />
End With<br />
End Sub
Praveen.K
System Engineer
Graviton Technologies Pvt.Ltd
|
|
|
|
|
Hi
Please advise me how to enter a new row in Microsoft Access Database by using vb.net.
regards
adil
|
|
|
|
|
R u kidding asking such a question in this forum...You shud first search that into google or any other search engine, then try it yourself and if you are facing any problem then post it here so that we can help you out. We are not here for spoon feeding. please avoid such stuff in future.
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
hi dear
I tried to find a lot ...as i am new to vb.net therefore suffering to solve my problem.
I used following code to retrive data..
Now i want to insert...but unable to do so...
Imports System.Data.OleDb
Public Class Form1 Inherits System.Windows.Forms.Form
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e as _
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles Button1.Click
Try
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;_
Data Source=C:\emp.mdb;")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("select * from table1", cn)
dr = cmd.ExecuteReader
While dr.Read()
TextBox1.Text = dr(0)
TextBox2.Text = dr(1)
TextBox3.Text = dr(2)
' loading data into TextBoxes by column index
End While
Catch
End Try
dr.Close()
cn.Close()
End Sub
End Class
regards
adil
m.adil.farooq
mcs & acca
adil-farooq@maktoob.com
|
|
|
|
|
you can try to use dataset or
oledbcommand with insert command and parameter
to create new row
|
|
|
|
|
I want to pop up a dialog box when the user disturbs the screensaver. Both the MsgBox and the InputBox work. When I try to pop up my own form using MyForm.ShowDialog(), it doesn't work. What's the difference between those boxes and mine? What do I have to do to make mine work like they do?
I'd use the Input box, but it is SO ugly!
JimT
|
|
|
|
|
Hi!
I have a question, how can open a pdf file?, i know what we can download a pdfkit, but, is possible open a pdf file without this kit?, by vb.net only?
Cuando salga el sol, no estare aqui...
|
|
|
|
|
You can open and read the file in Binary mode all you want. The .NET Framework doesn't have any support for interpreting and manipulating the contents of a PDF file though. If you wanted to manipulate the file, you'd have to have a library to do it for you, like the PDF.NET or something similar.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I understand, thanks very much for yours replies.
Cuando salga el sol, no estare aqui...
|
|
|
|
|
System.Diagnostics.Process.Start("\\Whateverpath\YourDocument.pdf")
The client just needs to have adobe reader on their system.
Lost in the vast sea of .NET
|
|
|
|
|
DateTime.Now.DayOfYear
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
i have an com application which keeps track of another application and displays the message accordingly made in vb6.
but it gives error70 when we handle the application to and fro very frequently.
can anyone help me on Error-70 or any idea about the possible reasons.
thanks in advance
amolk
|
|
|
|
|
It most likely means your remote COM server is busy or stopped. Basically, your app made a call to this COM server and the call timed out. You probably have a performance issue with your COM server.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
Thanks, i tried to get rid for the issue. now i'm thinking to convert code from the dll into exe, so even if the server is busy or timed out , we don't get the error in running application. can you please suggest is it possible or not and how.
thanks,
amolk
amolk
|
|
|
|
|
Just converting it to an .EXE won't do anything. It appears as if you have a performance problem with your server code. You have to figure out what that performance issue is and correct it. The questions you have to start asking yourself are: Which method has the problem and why is it taking so long to return a result? Is there another way to implement this class to respond faster?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
Thanks for your suggestion, i trace that error is due to clients' next request before the first complets and then there is no room to show the result for first one , hence if user sends request very fast the com gets busy and returns the error, while if user goes sequentially then the results are appropriate.
with regards,
amolk
|
|
|
|
|
Hi,
I'd like to copy an image with the File.Copy option. But, if i have the image loaded in a picturebox, it won't copy because the file is in use. I tried the picturebox.dispose option, but then i get an error message saying: invalid parameter used. Can anyone help me with copying an image loaded in a picturebox?? Thanks, Zaegra
--Zaegra--
|
|
|
|
|
I have seen some weird stuff where with images where you need to manually do Garbage Collection. I don't know for sure if that will help in your situation.
GC.Collect
Ben
|
|
|
|
|
If you are trying to copy an image, then it shouldn't matter if the file is being used or not. Do you mean that you are trying to move the image?
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
An image file loaded by Image.FromFile or some other method is held open for the life of the image object. The workaround is surprisingly simple... here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks guys, that helped me out
--Zaegra--
|
|
|
|
|
Hi,
I have 1 subreport on my main crystal Report.
I want to calculate Total of fields. one field from 1st main report & 2nd field from my subreport . Will Anyone Tell me how to do it.
i m using vb.net &crystal rpt.
-thanks
priya
|
|
|
|
|
For this i think u need include the table of subreport,
then make a formula to calculate that fields value...
it will display the total of both main report's field & sub report's field
Thanks,
Ankur Bakliwal
|
|
|
|
|
I've been trying to obtain the email header from messages in Outlook using VBA. I have done some investigation and found that in outlook they are stored separately and require use of the CDO library to get hold of the header. So, I used Tools-Reference to enable the CDO Win 2000 library, cdosys.dll and employed the code below - but on compiling in the Outlook VBA Editor it gives me errors in all references to that CDO library. Can anyone assist here? Many thanks
<br />
Public Function InternetHeaders() As String <br />
<br />
Dim objOutlook As Outlook.Application <br />
Dim objItem As Outlook.MailItem <br />
Dim objCDO As MAPI.Session <br />
Dim objMessage As MAPI.Message <br />
Dim objFields As MAPI.Fields <br />
Dim strID As String <br />
<br />
Const CdoPR_TRANSPORT_MESSAGE_HEADERS = &H7D001E <br />
<br />
On Error Resume Next <br />
<br />
' Instantiate an Outlook Application object.<br />
Set objOutlook = CreateObject("Outlook.Application") <br />
<br />
'Find the current email item and get its EntryID<br />
Set objItem = objOutlook.ActiveInspector.CurrentItem <br />
strID = objItem.EntryID <br />
<br />
'Then set up a CDO Session using a piggy-back login<br />
Set objCDO = CreateObject("MAPI.Session") <br />
objCDO.Logon "", "", False, False <br />
<br />
'Now get the item as a CDO Message<br />
Set objMessage = objCDO.GetMessage(strID) <br />
<br />
'Now get the headers from the message<br />
Set objFields = objMessage.Fields <br />
InternetHeaders = objFields.Item(CdoPR_TRANSPORT_MESSAGE_HEADERS).Value <br />
<br />
'Now that the headers are captured in a string you can do whatever you want with them<br />
objCDO.Logoff <br />
<br />
Set objFields = Nothing <br />
Set objMessage = Nothing <br />
Set objCDO = Nothing <br />
Set objItem = Nothing <br />
Set objOutlook = Nothing <br />
End Function <br />
u6ik
|
|
|
|