|
Look here:
[DataSet]
Looks like you need to provide a Dataset name in the constructor.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
Andy,
I have this name as my dataset
Dim ds As New DataSet
I looked over the link that you sent me .... and I think that I'd get an error if my data adapter wasn't built correctly.
|
|
|
|
|
After the sql statement is set (including the parameters), take the value from the IDE in a debug session and apply it directly in the database (if MS Access, create a new query) and run it to make sure that you _actually_ get the results you expect.
HTH
|
|
|
|
|
HTH,
here is the exact query (with variables included) that I just tried in my sql query analyzer:
SELECT [Exceptions].Employeenumber,[Exceptions].exceptiondate, [Exceptions].starttime, [exceptions].endtime, [Exceptions].code, datediff(minute, starttime, endtime) as duration INTO scratchpad3
FROM Employees INNER JOIN Exceptions ON [Exceptions].EmployeeNumber = [Exceptions].Employeenumber
where [Exceptions].exceptiondate between '5/2/2010 00:00:00' and '5/8/2010 11:59:59'
GROUP BY [Exceptions].Employeenumber, [Exceptions].Exceptiondate, [Exceptions].starttime, [exceptions].endtime,
[Exceptions].code, [Exceptions].exceptiondate
and that produces results.
|
|
|
|
|
Doug Ancil wrote: HTH,
"HTH" is not my name... it is short for "hope that helps"
Doug Ancil wrote: here is the exact query (with variables included) that I just tried in my sql query analyzer:
Just looked at your query again - doesn't a "select into" query create a table? it does not really return a result? How about creating a statement with a select * from the [new table]?
|
|
|
|
|
Chandra,
Sorry about that, but what I'm trying to do is to display that data back into a datagrid view (which is why the adapter.Fill(ds)) is there. Are you suggesting that after I run the query, to then create a select* from that table and then populate that to a datagridview via an adapter?
|
|
|
|
|
Doug Ancil wrote: Are you suggesting that after I run the query, to then create a select* from that table and then populate that to a datagridview via an adapter?
Yes.
|
|
|
|
|
Chandra,
Can you give me a good example of that that wouldnt require me to re-write a lot of code?
|
|
|
|
|
How about using a dataReader.ExecuteNonQuery on the first sql and then a data adapter for the select * to fill the data set?
|
|
|
|
|
from the sample:
Dim dataSet As DataSet = New DataSet("Suppliers")
...
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
Doug,
For your future reference, could you use <pre lang="vb"> your code goes here </pre> instead of <code></code>. The pre tags preserve formatting and give some syntactical colouring. As you will have seen, the code tags just give a horrible reddish colour. this hurts my eyes so much (genuinely) that I am unable to read your code, not that I could have helped anyway .
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
Henry,
Thanks for that. I've now fixed the code.
|
|
|
|
|
FYI[^]
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hi,
What is the best way to store/retrieve binary data in/from SQL server DB via VB.Net.
I have inheritate an SQL server database that has stored PDF files in a table and not got a clue in how to store or retrive the binary data. I plan to write a VB.Net application to display the contents.
Any ideas?
|
|
|
|
|
|
Is it possible to make the tab (a text 'Main Report' appears in it) invisible that appears in a CrystalReportViewer just below the Toolbar? I know it shows which section of the report is opened currently but in certain scenario I need it not to be visible. Please help. Regards.
|
|
|
|
|
priyamtheone wrote: Is it possible to make the tab (a text 'Main Report' appears in it) invisible that appears in a CrystalReportViewer just below the Toolbar? I know it shows which section of the report is opened currently but in certain scenario I need it not to be visible.
Are you referring to the group tree? If so, you can set it to not show by setting the DisplayGroupTree value to false.
HTH
|
|
|
|
|
Hello Everybody,
How can i add Embedded Menifest With Appliation of Visual Basic 2005 (Framework 2.0)
Thanks & Regards
If you can think then I Can.
|
|
|
|
|
|
Hi all, I'm going to finish the IT professional and management have to develop a final draft of the course. My project will be a program for managing a business lunch. Still have not programmed anything, just created the forms. When I change any label or whatever is the form the program does not change, crashes and it takes ages to open. If someone can explain to me why thanks.
|
|
|
|
|
exotiick wrote: why
because you did something wrong. Without any information to work on, that is as specific an answer you will get.
If there is a compile-time or run-time error, look at it; or report it here.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote:
because you did something wrong
used VB?
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Not necessarily. I once wrote a VB.NET app that didn't crash, in fact I have had more C# crashes than VB ones. Although my crash/LOC ratio is better overall in C#.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
exotiick wrote: If someone can explain to me why thanks.
I suspect that there is something wrong with your code, but without seeing some of it (or receiving a better explanation) it is impossible to guess.
I must get a clever new signature for 2011.
|
|
|
|
|
i dont have any code, i only have created the forms and design of forms
|
|
|
|