We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ADO and PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

101226 Oct 9,2011 07:42 PM UTC Oct 11,2011 09:49 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
rob
Asked On October 9, 2011 07:42 PM UTC

I'm trying to learn syncfusion over the weekend, first time user.
Code behind attached. What I trying to do is use the Syncfusion tablesample and plug in my SQL statement (simple select) to get the asp.net page to work. I getting an error "Cannot find table 0." when I try to build the PDF file. It happens on this line of code:

'Create datatable
Dim dataTable As DataTable = dataSet.Tables(0)

But think the real problem start here:
Private Function GetNorthwindDataSet(ByVal selectCommand As String) As DataSet
Dim dataSet As DataSet = New DataSet()
Try
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", True)
Dim connectionstring As String = ResolveApplicationDBPath("DSAMSConnectionString1") '("NorthwindIO.sdf")
Dim SqlMobileConnString1 As String = "Data Source = " + connectionstring
Dim conn As SqlConnection = New SqlConnection(SqlMobileConnString1)
conn.Open()
Dim Adapter As SqlDataAdapter = New SqlDataAdapter(DEF_DB_COMMAND2, conn)
Adapter.Fill(dataSet)

Catch
End Try

Return dataSet
I commented out "NorthwindIO.sdf I think that is the Northwind db file. I'm putting in my connection string from the webconfig.

Any help is appreciated I need to get this working and eventually call stored procedures to get results in the future.

Thanks,
Rob



vb-codebehind_332747b8.zip

Geetha M [Syncfusion]
Replied On October 11, 2011 09:49 AM UTC

Hi Rob,

Thank you for your interest in Syncfusion products.

The samples shipped with install makes use of SQL Server Compact Edition to connect with database (Northwind.sdf). Could you please make sure if you would like to use the same for your application? Also, the connection string you get from webconfig is sent to ResolveApplicationDBPath("DSAMSConnectionString1"). Could you please check it?

Regards,
Geetha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;