Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I wanna make a query that will detect the selected week and name of person.

 

I think maybe I put this in my datadapter?

 

SELECT employeeCode, friHours, monHours, satHours, sunHours, thuHours, timeSheetCode, tueHours, wedHours, weekNumber FROM tblTimeSheet WHERE ???????

 

 

it will output to a datagrid.

I only want a certain WEEK (weeknumber = 200403 for example)

But when I do make this procedure with out the WHERE clause

 

and try to do

 

OleDbDataAdapter3.Fill(DsHours1, "qry_timesheet")

 

but it pulls up like all info rather than just one.

I already make the query in the access database

 

 

any suggestions or ideas ?

  • Moderators
Posted

One way is to include a Where clause such as ...

 

dim someValue as integer = 200403 
"SELECT employeeCode, friHours ......... Where weeknumber = " & someValue

 

Or you can retrieve all the datafrom the db and the use RowFilter method of the Dataview.

dv.RowFilter = "weeknumber = " & someValue

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...