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