• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 979
  • Last Modified:

VB.Net Query Issue

Hello! I have been creating a .Net program that connects with a MySQL server to display large amounts of data in a Datagridview.  I have gotten my program to function perfectly except for my queries. I was asked to query every field in a 38 field database and it has not been the most forgiving experience.  My main issue is that some of the database field names  have more then one word in them.  As an example, [Order Received].  I cannot create queries for these multi-word fields.  I am trying to do this using the Visual Studio Query Builder.  If anyone is able to help on this situation I would greatly appreciate it.

~Hydrazi
Untitled.jpg
0
hydrazi
Asked:
hydrazi
  • 4
  • 3
1 Solution
 
CodeCruiserCommented:
As a general UI guide first, I would align all those textboxes.

Are you enclosing the multiword fields in [] ?
0
 
hydraziAuthor Commented:
I did [ ] but I still got an error. Let me post the error and the info I put into the builder.

For the Order Received I typed  LIKE [Orde Received] = @[Order Received] and I get a expression expected error
0
 
CodeCruiserCommented:
Why do you have a space in parameter name? I think that's the issue.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
hydraziAuthor Commented:
Ill try removing the space.

I removed the spacing and it said "Cannot convert entry to valid date/time"?
0
 
CodeCruiserCommented:
If the column in db is datetime then use covert function to convert it

Convert(datetime, @orderreceived, 101)
0
 
hydraziAuthor Commented:
I would type that in the builder?
0
 
CodeCruiserCommented:
I don't use the designer/builder so not entirely sure but try that.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now