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

  • SEARCH
  • Home
  • 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 9029661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:17:59+00:00 2026-06-16T07:17:59+00:00

A friend of mine has a problem, she has done a project in c#

  • 0

A friend of mine has a problem, she has done a project in c# and everything looks fine, but the problem is that, she gets error with the SQL query when she puts it in the code, but when we try the code in microsoft SQL Server it works.

Here is thee example f the code where the error shows:

DataSet dsDelP = new DataSet();
string sql = "";
sql = "SELECT Grupi_ID, (p.emri + ' ' + p.mbiemri) as Profesori , k.EmriKlases as Klasa, d.emri as Dita, Ora_fillimit as Fillimi, Ora_mbarimit as Mbarimi";
sql += "FROM grupetOraret gro";
sql += "inner join Profesori p on gro.Profesori_ID=p.Profesor_ID";
sql += "inner join Klasa k on gro.Klasa_ID=k.Klasa_ID";
sql += "inner join Dita d on gro.ID_Dita=d.ID_dita";

SqlDataAdapter daDelP = new SqlDataAdapter(sql, con);
daDelP.Fill(dsDelP, "grupetOraret");
dataGridViewKerkoOrarin.DataSource = dsDelP.Tables[0].DefaultView;
  • 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-06-16T07:18:00+00:00Added an answer on June 16, 2026 at 7:18 am

    You have no spaces. You should add them in every line (in its beggining or ending). This is how it should look like, assuming the query itself is correct (as soon as you checked it already):

    sql = "SELECT Grupi_ID, (p.emri + ' ' + p.mbiemri) as Profesori , k.EmriKlases as Klasa,  d.emri as Dita, Ora_fillimit as Fillimi, Ora_mbarimit as Mbarimi ";
    sql += "FROM grupetOraret gro ";
    sql += "inner join Profesori p on gro.Profesori_ID=p.Profesor_ID ";
    sql += "inner join Klasa k on gro.Klasa_ID=k.Klasa_ID ";
    sql += "inner join Dita d on gro.ID_Dita=d.ID_dita ";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A friend of mine has inherited an old Joomla 1.0.x site, that amongst other
A friend of mine gets appointment requests in e-mails but cannot control the format
Friend of mine has a problem :). There is an application written in Visual
A friend of mine has told me that on x86 architecture DMA controller can't
A friend of mine has a MS SQL database installed. He wanted to be
A friend of mine has a problem with his wordpress blog. When you watch
A friend of mine has a static web site. She would like to add
A friend of mine with the iphone OS4 has pointed out that my app
This is a problem a friend of mine has. He has a table keyword
A friend of mine has a catalogue that currently holds about 500 rows or

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.