|
i want to use dataset with created runtime to populate my report.i use this code
Classes_Obj.getRecord is return dataset
but this gives error as "The report has no tables"
could anyone help me
Dim aa As DataSet
aa = Classes_Obj.getRecord("select * from Frames")
ReportPurchase.SetDataSource(aa)
ReportViwer.rptContainer.ReportSource = ReportPurchase
'ReportPurchase.PrintToPrinter(1, False, 0, 0)
ReportViwer.ShowDialog()
-- modified at 9:08 Monday 27th November, 2006
|
|
|
|
|
Hi, The following code is generating an error....I have put comments in front of the line that generated error.
Can anybody help me in this?
Thanks,
Public Sub ConnectSQL()
Dim conn As New SqlClient.SqlConnection
Dim da As New SqlClient.SqlDataAdapter
da = SqlDataAdapter1 'This Adapter is manually created using the Wizard
conn = SqlConnection1 'This Connection is manually created using the Wizard
Dim selectCommand As New SqlClient.SqlCommand("SELECT cFName from PersonalDetails") 'Selecting The first column from the table
da.SelectCommand = selectCommand
Dim Reader As SqlClient.SqlDataReader
Dim RecordCount As Integer = 0
conn.Open()
Reader = selectCommand.ExecuteReader() 'This line is generating an error!!
Dim Records As String
While Reader.Read()
Dim i As Integer = 0
For i = 0 To Reader.FieldCount - 1
Records &= Reader(i) & "-"
Next
RecordCount += 1
End While
|
|
|
|
|
The Problem is you are not setting the connection or command type of your select command. Add these two lines right before you execure the reader
<br />
selectCommand.Connection = conn<br />
selectCommand.CommandText = CommandType.Text<br />
Hope this works
Kevin
|
|
|
|
|
Hi Kevin
I added the above lines of code. I am getting the same error.
However, Thanks for your help
|
|
|
|
|
Private Sub btnButtonvisible_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnButtonvisible.MouseEnter
btnButtonvisible.Visible = False
End Sub
Private Sub btnButtonvisible_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnButtonvisible.MouseLeave
btnButtonvisible.Visible = True
End Sub
End Class
shyamy
|
|
|
|
|
And your question is?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
One help.
I have the below function declaration.What is the default access specifier of the declaration.Is it private or public.
"Function FindDevice() As Boolean"
|
|
|
|
|
The default is Public . You can find out more here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
i m a student . and i want to make a software in asp.net.....
i want a simple topic which i can handel;P;P
hdfh
|
|
|
|
|
Well, we have no idea what you can handle. Have you done any study ? Read any books ?
Do you know how to work with a database ? If so, how about a CD list web app ? That's nice and simple.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
This[^] was designed especially for you
|
|
|
|
|
I like it!
Kevin
|
|
|
|
|
A guestbook is a good beginner project. It contains the simplest form of the basic principles for most web applications; data entry, storage and retrieval.
---
b { font-weight: normal; }
|
|
|
|
|
Dear All,
I want to fire message box while my one function is running and after clicking yes on message dialoge, i want to process another code in VB.Net.
is their any technique that i can use to do so other than javascript...because javascript allows me to fire confirmation box on click event of button or any control.. i want my message box fired in between code running...
Urgent Help Needed....
Thanks,
TC
|
|
|
|
|
Hi TC,
Your problem description is a bit vague. Do you just need confirmation from the user before the process can continue, or do you want to run two processes at the same time, one of which should ask for confirmation while the other one just continues?
Regards,
Johan
|
|
|
|
|
no i want to do some activity after user confirmation...
TC
|
|
|
|
|
TC28 wrote: is their any technique that i can use to do so other than javascript...
NO - if you want a message box on the client, Jscript is the language that runs on the client.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
How to take an image from SQL Server to Crystal Report?
|
|
|
|
|
Hello! Everybody.
Connecting series of coordinate data forms Undee graphic. The Problem is how i store these mass data?
Write to DB or Text File or else?
Could you give me some suggestions?
Looking forward to your answer!
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
hi all:
how the bold code suppose to check if the fsi(FileSystemInfo object)
contain file or directory ??
its working fine but i want to understand how ??
Sub DisplayFileSystemInfoAttributes(ByVal fsi As IO.FileSystemInfo)
' Assume that this entry is a file.
Dim entryType As String = "File"
' Determine if this entry is really a directory.
If (fsi.Attributes And FileAttributes.Directory) <> 0 Then
entryType = "Directory"
End If
End Sub
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
The And operator ( && in real programming languages ) returns true if the value on the right is also contained in the value on the left. In other words, if Directory is 0010 in binary, then 0011 and 0010 will both return true, 0001 will not.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
please excuse me.......
but what is the mean of Christian Graus wrote: if Directory is 0010 in binary, then 0011 and 0010 will both return true, 0001 will not.
specially the bold code
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
If Directory is a number ( and, as an enum, it is ), and it's binary representation is 0010, then the collection of values represented by 0010 and 0011 will both contain the Directory value, and will so both return true when Anded with Directory.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
ok... but why the coder choose to add the value of the file attributes
to FileAttribute.Directory(10000)
example of directory
10110 and
10000
------
10000
example of file
100000 and
010000
------
000000
why is both cases we have to add the value(10000)
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|