Need your help please

vb6 Mauritius
  • 13 years ago
    Sir, i want to create a report following certain parameters
    but till now, i'm getting many probs wid it

    for example, if i just entered some details on a screen and saved it, i want to display the details of only that particular subject.

    i have an index num textbox. saved all the deatils and now want to print it..

    what syntax should i put in the dataenvironement/properties/command????

    this is my problem. i no that select * from DB will display all details, but i want specific records. thanking you in advance for replying me












  • 13 years ago
    Firstly, welcome to Developer Fusion!!!

    Without meaning to sound rude, some tips for getting the most out of the forums:

    Please start a new thread for your problem, don't just post your question in reply to someone else's thread.

    Use a meaningful name for your post, give a description of your problem.  "Need your help please" doesn't give us any idea what your problem is!!

    Finally, give a thorough description of your problem:  what DB are you using?  What exactly are you trying to do?  Post any code that you have already written, post details of any errors you are receiving, etc..

    You will get a much better response if you follow these basic rules.

    In response to your problem, you say that "i no that select * from DB will display all details, but i want specific records".  To select specific records you just need to add a WHERE clause to your SQL, eg:

    If you have a textbox control on your form called Text1 you could accept search criteria from the user in this box and amend your SQL like:

    strSQL = "SELECT * FROM myTable WHERE myField = '" & Trim(Text1.Text) & "' "

    Or, if your field is numeric you dont need the single quotes:

    strSQL = "SELECT * FROM myTable WHERE myField = " & Trim(Text1.Text)

    I apologise if this comes across as rude, it is not my intention.  Post a thorough description of your problem and I will do my best to help!!!





















  • 13 years ago

    You're such a tough guy Rob ! ;-)

    But you're absolutely right, the more information is provided, the quicker and better people can answer questions.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“You can stand on the shoulders of giants OR a big enough pile of dwarfs, works either way.”