[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/20/2009 at 08:10PM PDT, ID: 24829268
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.3

Unable to import XLS into SQL database through DataSet and TableAdapter

Asked by bobbellows in MS SQL Server, Visual Basic Programming, SQL Query Syntax, Microsoft Excel Spreadsheet Software, Visual Studio

Tags: SQL, EXCEL, XLS, DataSet, TableAdapter, VisualStudio 2008, VB

I am adapting a tutorial to import an excel spreadsheet into an SQL database. I am new to the whole procedure but have made some great progress. I am using a DataSet and TableAdapter to accomplish the task. The reader is working as I can use a counter routine to stop it at a certain point, or if I don't it will display the last record. First a check is made to see if a record already exists with a student_id. If not, the record is inserted into the database. Reccords aren't being inserted. I started to troubleshoot the problem and came across this error in the code behind. I figure it's a good place to start but I don't know enough about the syntax to correct it. This is the line:  
                StudentARecordNumber = Convert.ToInt32(FinaoAdapter.InsertStudentInfoAQuery(student_id, last_name, first_name, middle_name, Gender, birthdate, Grade, ethnicity, lep, SPED, Sheltered, AIP, AVID, ELL, notes, He_She, His_Hers, Him_Her))
This is the error VisualStudio gives me:
Public Overridable Function InsertStudentInfoAQuery() As Interger' has no parameters and its return type cannot be indexed. Any suggestions? below is some of the code behind.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Dim StudentARecordNumber As Integer = 0
        Try
            Dim FinaoAdapter As New StudentInfoADataSetTableAdapters.StudentInfoA_localTableAdapter
            Dim FinaoDataTable As StudentInfoADataSet.StudentInfoA_localDataTable = Nothing
            FinaoDataTable = FinaoAdapter.GetStudentInfoADataByRecordNumber(StudentARecordNumber)
 
            ' see if the student already exists in the table, if not insert it
            If Not FinaoDataTable Is Nothing Then
                If FinaoDataTable.Rows.Count > 0 Then
                    If Not FinaoDataTable(0).StudentARecordNumber = Nothing Then
                        StudentARecordNumber = FinaoDataTable(0).StudentARecordNumber
                        LabelImport.Text = LabelImport.Text & "<fontcolor=lime>Member Found, Not Imported: " & "ID: " & student_id & " " & last_name & ", " & first_name & ".</Font><br />"
 
                    End If
                End If
            End If
            If StudentARecordNumber = 0 Then
                ' retrieve the identity key StudentARecordNumber from the insert
                StudentARecordNumber = Convert.ToInt32(FinaoAdapter.InsertStudentInfoAQuery(student_id, last_name, first_name, middle_name, Gender, birthdate, Grade, ethnicity, lep, SPED, Sheltered, AIP, AVID, ELL, notes, He_She, His_Hers, Him_Her))
[+][-]10/20/09 10:07 PM, ID: 25620928

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/21/09 04:27 AM, ID: 25622782

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/25/09 09:02 AM, ID: 25657012

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/25/09 09:04 AM, ID: 25657015

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/25/09 09:43 AM, ID: 25657188

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/25/09 08:54 PM, ID: 25659585

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/26/09 06:29 AM, ID: 25662005

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/27/09 05:12 AM, ID: 25671459

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/27/09 11:17 AM, ID: 25675641

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/27/09 04:51 PM, ID: 25678891

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/28/09 05:27 AM, ID: 25682427

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/28/09 09:47 PM, ID: 25690733

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/29/09 04:28 AM, ID: 25692439

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/29/09 05:17 AM, ID: 25692749

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/29/09 07:15 AM, ID: 25693903

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/01/09 05:24 AM, ID: 25713627

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/01/09 08:19 AM, ID: 25714192

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/01/09 12:33 PM, ID: 25715316

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/13/09 04:23 AM, ID: 25813301

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/13/09 05:08 AM, ID: 25813562

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, Visual Basic Programming, SQL Query Syntax, Microsoft Excel Spreadsheet Software, Visual Studio
Tags: SQL, EXCEL, XLS, DataSet, TableAdapter, VisualStudio 2008, VB
Sign Up Now!
Solution Provided By: mdougan
Participating Experts: 2
Solution Grade: A
 
 
[+][-]11/14/09 09:58 AM, ID: 25821725

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/14/09 10:38 AM, ID: 25821849

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625