Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 686711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:03:07+00:00 2026-05-14T02:03:07+00:00

Im using vb.net and I need to fetch data from two different tables and

  • 0

Im using vb.net and I need to fetch data from two different tables and display it in form of report.
These are the schemas and data of my two tables:

CREATE TABLE personal_details (staff_ID integer PRIMARY KEY, title varchar(10), fn varchar(250), ln varchar(250), mn varchar(250), dob varchar(50), hometown varchar(250), securityno varchar(50), phone varchar(15), phone2 varchar(15), phone3 varchar(15), email varchar(250), address varchar(300), confirmation varchar(50), retirement varchar(50), designation varchar(250), region varchar(250));
INSERT INTO personal_details VALUES(1,'Mr.','Selom','AMOUZOU','Kokou','Sunday, March 28, 2010','Ho',7736,'024-747-4883','277-383-8383','027-838-3837','shellom2005@yahoo.fr','Lapaz Kum Hotel','Sunday, March 28, 2010','Sunday, March 28, 2010','Designeur','Brong Ahafo');


CREATE TABLE training(
    training_ID integer primary key NOT NULL,
    staff_ID varchar(100),
    training_level varchar (60),
    school_name varchar(100),
    start_date varchar(100), end_date varchar(100));
INSERT INTO training VALUES(1,1,'Primary School','New School','Feb 1955','May 1973');
INSERT INTO training VALUES(2,1,'Middle/JSS','Ipmc','Feb 1955','May 1973');

Im trying to fetch and display data from the tables above the following way:

Dim rpt As New CrystalReport1()
            Dim da As New SQLiteDataAdapter
            Dim ds As New presbydbDataSet
            ds.EnforceConstraints = False

If conn.State = ConnectionState.Closed Then
                conn.Open()
            End If

Dim cmd As New SQLiteCommand("SELECT p.fn, t.training_level FROM personal_details p INNER JOIN training t ON p.staff_ID = t.staff_ID", conn)
            cmd.ExecuteNonQuery()
            da.SelectCommand = cmd
            da.Fill(ds)

            rpt.SetDataSource(ds)
            CrystalReportViewer1.ReportSource = rpt
            conn.Close()

My problem is that nothing displays on the report unless I take off either the training fields or the personal_details fields from the report. Need your help. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:03:08+00:00Added an answer on May 14, 2026 at 2:03 am

    My guess (since you don’t specify what database engine you’re using) is that you’re unsuccessfully comparing the varchar staff_id with the integer staff_id. Try defining training.staff_id as an integer as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 512k
  • Answers 512k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, you can use min-height, which is not supported by… May 16, 2026 at 5:38 pm
  • Editorial Team
    Editorial Team added an answer You have to pass each command line argument as different… May 16, 2026 at 5:38 pm
  • Editorial Team
    Editorial Team added an answer When you open a tag within another tag, the tag… May 16, 2026 at 5:38 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have the following Query and i need the query to fetch data from
I am using VB.net. I need to fill a gridview(1) with data that cames
I've been developing a simple website using asp.net MVC and I'm starting to add
I have a oracle table with record count of 99896618. I need to fetch
Need help in figuring out a way to fetch a particular block of content
I'm using .NET 4 and the Entity Framework to construct a simple query. Here's
I need to write a web service on a .NET platform for an IPhone
I have an app that was created using .net Framework 3.5. However, I now
I need to maintain an xml column in a SQL database. a) in my
I am testing Paypal's masspay using their ' MassPay NVP example ' and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.