Click here to Skip to main content
15,921,454 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Check whether an area on panel is blank or not Pin
nishkarsh_k15-Jan-08 22:56
nishkarsh_k15-Jan-08 22:56 
GeneralRe: Check whether an area on panel is blank or not Pin
Scubapro16-Jan-08 1:20
Scubapro16-Jan-08 1:20 
GeneralRe: Check whether an area on panel is blank or not Pin
Dave Kreskowiak16-Jan-08 2:17
mveDave Kreskowiak16-Jan-08 2:17 
GeneralRe: Check whether an area on panel is blank or not Pin
Scubapro16-Jan-08 2:43
Scubapro16-Jan-08 2:43 
GeneralRe: Check whether an area on panel is blank or not Pin
Dave Kreskowiak16-Jan-08 3:38
mveDave Kreskowiak16-Jan-08 3:38 
GeneralRe: Check whether an area on panel is blank or not Pin
Scubapro16-Jan-08 19:57
Scubapro16-Jan-08 19:57 
QuestionConnection string from VB.Net to Crystal Report 10 Pin
Winarto15-Jan-08 19:29
Winarto15-Jan-08 19:29 
GeneralRe: Connection string from VB.Net to Crystal Report 10 Pin
John_Adams15-Jan-08 22:13
John_Adams15-Jan-08 22:13 
Hi,

You may try the below mentioned code snippet to connect your VB.Net application to Crystal Report using ADO.Net.

-------------------------------------------------------------------------
BEGIN CODE

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim rpt As New CrystalReport1() 'The report you created.
Dim myConnection As SqlConnection
Dim MyCommand As New SqlCommand()
Dim myDA As New SqlDataAdapter()
Dim myDS As New Dataset1() 'The DataSet you created.

Try

myConnection = New SqlConnection("Data Source=localhost;Integrated Security=SSPI;" & _
"Initial Catalog=northwind;")
MyCommand.Connection = myConnection
MyCommand.CommandText = "SELECT * FROM Customers"
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand

myDA.Fill(myDS, "Customers")
rpt.SetDataSource(myDS)
CrystalReportViewer1.ReportSource = rpt

Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

END CODE
-------------------------------------------------------------------------

I hope this helps Smile | :) .

Regards,
John Adams
ComponentOne LLC

QuestionPOS Printing Pin
xbiplav15-Jan-08 10:16
xbiplav15-Jan-08 10:16 
GeneralRe: POS Printing Pin
Dave Kreskowiak15-Jan-08 10:34
mveDave Kreskowiak15-Jan-08 10:34 
GeneralTextbox Array Pin
parth.p15-Jan-08 9:55
parth.p15-Jan-08 9:55 
GeneralRe: Textbox Array Pin
Dave Kreskowiak15-Jan-08 10:30
mveDave Kreskowiak15-Jan-08 10:30 
GeneralRe: Textbox Array Pin
parth.p15-Jan-08 10:33
parth.p15-Jan-08 10:33 
GeneralRe: Textbox Array Pin
Dave Kreskowiak15-Jan-08 10:49
mveDave Kreskowiak15-Jan-08 10:49 
GeneralRe: Textbox Array Pin
parth.p15-Jan-08 22:35
parth.p15-Jan-08 22:35 
GeneralRe: Textbox Array Pin
Dave Kreskowiak16-Jan-08 2:02
mveDave Kreskowiak16-Jan-08 2:02 
GeneralBeginner - VB 6 and Multimedia, type declarations Pin
Jan3415-Jan-08 8:19
Jan3415-Jan-08 8:19 
GeneralRe: Beginner - VB 6 and Multimedia, type declarations Pin
Dave Kreskowiak15-Jan-08 9:16
mveDave Kreskowiak15-Jan-08 9:16 
GeneralRe: Beginner - VB 6 and Multimedia, type declarations Pin
MikeMarq15-Jan-08 14:53
MikeMarq15-Jan-08 14:53 
GeneralRead and compile a stored procedure Pin
HenrydeSousa15-Jan-08 6:24
HenrydeSousa15-Jan-08 6:24 
GeneralRe: Read and compile a stored procedure Pin
Dave Kreskowiak15-Jan-08 9:19
mveDave Kreskowiak15-Jan-08 9:19 
GeneralRe: Read and compile a stored procedure [modified] Pin
HenrydeSousa15-Jan-08 15:40
HenrydeSousa15-Jan-08 15:40 
GeneralRe: Read and compile a stored procedure Pin
Dave Kreskowiak16-Jan-08 4:34
mveDave Kreskowiak16-Jan-08 4:34 
GeneralRe: Read and compile a stored procedure Pin
HenrydeSousa16-Jan-08 7:10
HenrydeSousa16-Jan-08 7:10 
GeneralRe: Read and compile a stored procedure Pin
HenrydeSousa11-Feb-08 14:56
HenrydeSousa11-Feb-08 14:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.