Search:

Type: Posts; User: Calver

Page 1 of 3 1 2 3

Search: Search took 0.05 seconds.

  1. Thread: DataSources???

    by Calver
    Replies
    4
    Views
    7,193

    Re: DataSources???

    I'm afraid I can't help with VS Reporting Tools, as I don't use them. I normally create Excel files and print from there, sometimes to PDF.
  2. Thread: DataSources???

    by Calver
    Replies
    4
    Views
    7,193

    Re: DataSources???

    Hello, this is the tutorial that enabled me to understand how Silverlight connects to SQL Server...

    http://www.codeproject.com/KB/silverlight/Silverlight3_SQL_WCF.aspx

    Hope this helps :)
  3. Replies
    5
    Views
    485

    Re: ORDER BY use assistance

    I had a similar problem last week, and I solved it by enclosing the whole query in another SELECT query, and selecting the column aliases. Something like this...

    SELECT
    [Part Number],...
  4. Replies
    5
    Views
    2,859

    Re: [MS SQL] Combine CASE and SUM ?

    Perfect! Another DataReader loop bites the dust :) Your help is very much appreciated.
  5. Replies
    5
    Views
    2,859

    Re: [MS SQL] Combine CASE and SUM ?

    Thanks again! I'll report back tomorrow :)
  6. Replies
    5
    Views
    2,859

    Re: [MS SQL] Combine CASE and SUM ?

    Thank you. I can use that, but I really wanted to return only the total from all records. So something like this? (I can't test it until tomorrow morning) ...


    SELECT
    SUM(CASE WHEN DocType = 0...
  7. Replies
    5
    Views
    2,859

    [RESOLVED] [MS SQL] Combine CASE and SUM ?

    Hello, I'm wondering if someone could help me with this query problem.

    I can retrieve rows from my Invoices table as below. I'm using CASE to distinguish between Invoices and Credit Notes, as the...
  8. Replies
    11
    Views
    1,136

    Re: MS SQL 2005 - DateTime problem

    All parameterised and working now! Thanks again for all the help, and patience :)
  9. Replies
    11
    Views
    1,136

    Re: MS SQL 2005 - DateTime problem

    OK, will run a second array just for the dates, until I get around to making a proper collection (my first run through the database builds an array of search criteria to apply in this query).
  10. Replies
    11
    Views
    1,136

    Re: MS SQL 2005 - DateTime problem

    Ok, parameters it is! Hopefully I can conclude this tomorrow morning. Many thanks for all the help.
  11. Replies
    11
    Views
    1,136

    Re: MS SQL 2005 - DateTime problem

    I'm looking for records earlier than Oct 5. I just did a query in Management Studio and it returned the DateTime like this: '2009-10-05 17:22:55.453'.

    But the DataReader returns '05/10/2009...
  12. Replies
    11
    Views
    1,136

    Re: MS SQL 2005 - DateTime problem

    I'm getting the date from the same table in an earlier query, via a DataReader, and saving it in a string array:


    Cr(CrCount, 5) = (dr("DateTimeCreated"))

    Then I'm looking for records earlier...
  13. Replies
    11
    Views
    1,136

    Re: MS SQL 2005 - DateTime problem

    I take your point. 'tblLine.DateTimeCreated' is a DateTime field in the database. I want to select records that are earlier than the string I'm submitting, e.g. '05/10/2009 17:22:55'. The correct...
  14. Replies
    11
    Views
    1,136

    [RESOLVED] MS SQL 2005 - DateTime problem

    Hello, I can't seem to find an answer to this problem. I have a string field with a date and time, and I want to select records that are earlier than this string.

    Part of my query is looking like...
  15. Replies
    5
    Views
    461

    Re: SQL Query help please

    The problem I found using INNER JOIN was that I needed all search criteria to be true. Using AND instead of OR didn't work because an Analysis record can never satisfy more than one condition. At...
  16. Replies
    5
    Views
    461

    Re: SQL Query help please

    Thank you for your reply. I'm afraid I got into a muddle trying to do it with the IN statement. I read that you can't compare more than 1 value, and I need to compare both the HeadID and ValueID.
    ...
  17. Replies
    5
    Views
    461

    SQL Query help please

    [VS 2008 / VB.Net / MS SQL 2005]

    Hello, I have to create a query at work tomorrow, but I can't see a way to do it.

    I want to return a list of customers from...

    tblCUS
    AccID - AccNo -...
  18. Replies
    7
    Views
    556

    Re: Help with SQL Query please

    No problem Chris, you've helped me learn a lot today! And the Sales looked good for a while ;)
  19. Replies
    7
    Views
    556

    Re: Help with SQL Query please

    Thank you very much to Chris and Si for helping me out with this. It's now working, but I still have to check I have the right numbers!

    Chris: When moving into the Query Builder it was inserting...
  20. Replies
    7
    Views
    556

    [RESOLVED] Help with SQL Query please

    Hello,

    [VS 2008 / VB.Net / MS SQL 2005]

    I need to create a Data Souce to bind to a DataGridView. This will give me a summary of Sales by AccNo like this (one row for each account) ...

    AccNo...
  21. Replies
    5
    Views
    2,224

    Re: SQL Express 2005 Timeout problem

    Checked the firewall on the server and the SQL Express instance was not in the exceptions. Now it's been added my program connects first time, every time. Still don't understand why it would connect...
  22. Replies
    5
    Views
    2,224

    Re: SQL Express 2005 Timeout problem

    It's a new domain server running Windows Server 2008 on the local network. We haven't purchased SQL Server yet, but it has Express installed. We thought we could use this for testing a new VB.Net...
  23. Replies
    5
    Views
    2,224

    Re: SQL Express 2005 Timeout problem

    Many thanks for the reply tg. Will have a look at troubleshooting the server. It's brand new and not doing very much yet.
  24. Replies
    5
    Views
    2,224

    [RESOLVED] SQL Express 2005 Timeout problem

    Hello, I'm connectiong to an SQL Express 2005 database on a remote Windows 2008 Server, using VB.Net 2008 Pro...

    conn = New SqlConnection("Data Source=MyServer\SQLEXPRESS;Initial...
  25. Replies
    4
    Views
    619

    Re: [2008] Problem with Date format

    Thank you Artur. I think the problem was in my SQL Command. I was inserting the values directly instead of using parameters. Initial tests indicate that the dates are working ok.

    I appreciate the...
  26. Replies
    4
    Views
    619

    Re: [2008] Problem with Date format

    Thank you for your reply. That line of code gives this error message..

    'Conversion from string "02/13/2009" to type 'Date' is not valid.'
  27. Replies
    4
    Views
    619

    [RESOLVED] [2008] Problem with Date format

    I'm using a DateTimePicker with CustomFormat 'dd MMM yyyy' to get a date like this...

    Dim DateStarted As Date = dtpStarted.Value

    dtpStarted is showing the correct date - 13 Feb 2009 - but the...
  28. Replies
    5
    Views
    4,844

    Re: Parse data into picture

    Here's some code I put together with the help of members here, and other places on the internet. It shows how to copy a byte array to an ImageBox.

    For testing Start with a jpeg in your App folder...
  29. Replies
    5
    Views
    4,844

    Re: Parse data into picture

    The JPEG data should start with the hex string 'FFD8' and terminate with 'FFD9'. In an example I've just looked at it starts 6 bytes before the 'JFIF' you can see.

    If you create a byte array with...
  30. Replies
    2
    Views
    2,556

    Re: Printing tif files

    The free IrfanView has silent command line options you can shell to. I've used it to re-size JPEGs to a PictureBox. You could use it to print, or convert to JPEG and print from VB6. Depends if you...
  31. Replies
    19
    Views
    1,502

    Re: Moon Days at Birth

    Mike, you have a couple of lines in the Remainder function which shouldn't be there...

    Text2 = MoonPhase
    End Function
  32. Replies
    3
    Views
    671

    Re: Ask about images and icons

    Lots of them here.
  33. Replies
    9
    Views
    871

    Re: Export excel

    Also, 28. Exit Sub is always being executed.
  34. Replies
    9
    Views
    871

    Re: Export excel

    Hello, have you checked the value of j ? ...

    For i = 1 To (j - 1)
  35. Replies
    21
    Views
    7,546

    Re: [RESOLVED] highlight text box on tab selection

    Here's a routine I use in most of my programs. It works for single controls or control arrays. I just have to type SelText in the GotFocus event...


    Option Explicit

    Public Sub SelText()
    ...
  36. Replies
    5
    Views
    589

    Re: on exit ask to save

    Good morning, thought I'd better tidy up!

    Yes, I should have used the Form_QueryUnload event in my example above. And yes, you will need a Boolean variable to determine whether the changes need...
  37. Replies
    5
    Views
    589

    Re: on exit ask to save

    You can use the Form_Unload event...


    Private Sub Form_Unload(Cancel As Integer)

    Select Case MsgBox("Save changes?", vbYesNoCancel + vbQuestion)

    Case vbYes
    ...
  38. Re: Database field data type problem

    You're welcome Paul :) If it was me I'd change the data type to Currency. Things would be much easier.

    Please see This Thread for further information.
  39. Re: Database field data type problem

    Paul, this is a big problem with Single and Double floating point types. You will need to round the result of the calculation, or use a Currency data type.
  40. Replies
    5
    Views
    1,393

    Re: Subtracting 10 working days from today's date

    Good point - here's a safer version :)


    Private Sub Form_Load()
    MsgBox DecDate(Date, 10)
    End Sub

    Private Function DecDate(ByVal startDate As Date, ByVal days As Integer) As Date
    Dim...
Results 1 to 40 of 101
Page 1 of 3 1 2 3



Click Here to Expand Forum to Full Width