Search:

Type: Posts; User: The_Grudge

Page 1 of 13 1 2 3 4

Search: Search took 0.82 seconds.

  1. Re: Command - "Multiple-step OLE DB Operation generated errors"

    That seemed to do the trick. I moved the parameter creation outside the loop. Then, after it writes and figures out the next clinic date I update the parameter with:


    .Parameters("ClinicDate")...
  2. Re: Command - "Multiple-step OLE DB Operation generated errors"

    I return...

    I've cleaned up the code a bit and again, it works on the first iteration through the loop. On the second time through that error crops up again.


    Public Function...
  3. Re: Command - "Multiple-step OLE DB Operation generated errors"

    Thanks guys, I get it. I may post my entire code tomorrow if I can't figure it out.

    The IF statement above has two SQL statements and the first one (with the "Special_Booked_Date") is never...
  4. Re: Command - "Multiple-step OLE DB Operation generated errors"

    The first part would fail yes, but I’m just testing one specific record at the moment and the first part of the if is never fired. It just looks at the Else....that’s where the error stems from —...
  5. Re: Command - "Multiple-step OLE DB Operation generated errors"

    Sure - see below. Now I wrote this 12 years ago and haven't hardly looked at it since. I'm going through converting it to work with SQL Server as we're moving off Oracle.

    I may have to rewrite...
  6. Re: Command - "Multiple-step OLE DB Operation generated errors"

    Makes sense, but I moved that outside the loop and still get the error.
  7. Command - "Multiple-step OLE DB Operation generated errors"

    I have the following code within a Loop.

    It works perfectly if I write one record at a time, but within the loop (loading multiple records) I get the error:

    "Multiple-step OLE DB operation...
  8. Re: Parameters in Query Using "LIKE" statement

    Seems I was mistaken. Query runs but doesn't return matches -- and it should. If I hard code a value in it works so something about that "LIKE" it doesn't -- ahem -- like.

    Here's what I had to do...
  9. Re: Parameters in Query Using "LIKE" statement

    I think I got it. One of my parameters was incorrect. Seems to be okay now.
  10. Re: Parameters in Query Using "LIKE" statement

    It's a string. Value is "97"
  11. [RESOLVED] Parameters in Query Using "LIKE" statement

    I'm sure I have a few issues in this statement, but I believe my main issue comes from where my "LIKE" statement resides.

    I'm using parameters in VB 6 -- hence my post to this forum and not the...
  12. Re: SQL Parameter Query - Rowset Position Cannot be Restarted

    I had a Set rsGetTodaysData = New Recordset statement at the top of that sub.

    I don't know why, but even though I specified a cursor location and type it wasn't "taking". Not until I changed that...
  13. Re: SQL Parameter Query - Rowset Position Cannot be Restarted

    I put that in too.
  14. Re: SQL Parameter Query - Rowset Position Cannot be Restarted

    Think I got it.

    Changed the line "Set rsGetTodaysData = objCommand.Execute" to say "rsGetTodaysData.Open objCommand". That runs my query and by checking the cursor location and type with a...
  15. SQL Parameter Query - Rowset Position Cannot be Restarted

    I have the following code:

    It works in that my query executes and if I remove the .MoveFirst statement (bold below), but I need that statement in there as my records are sorted in order and I...
  16. Re: Query with parameters not working - why not?

    Of course!

    Thank you. Now I'm getting an error that says "Operation Not Allowed when the Object is Open".

    I have a global connection variable and my code now looks like this


    strSQL =...
  17. Query with parameters not working - why not?

    I have a few queries in my app that I've rewritten to work with parameters. They all work fine.

    When I went to update this part of the code today though, I've run into trouble and can't get this...
  18. Replies
    3
    Views
    2,325

    Re: Using Parameters in Queries

    Thanks. I tried using parameters like @StartDate and @EndDate, but it wouldn't work. A post on here suggested trying ? instead and that seemed to work.

    I do format the date in the code (Dim...
  19. Replies
    3
    Views
    2,325

    Using Parameters in Queries

    I wrote an app about ten years ago using VB 6.0. It connects to an Oracle back-end and it's been humming along pretty well for that time with periodic updates to functionality. I primarily work as a...
  20. Re: Database - How do I use an ADO Command object?

    Thanks for posting this. My skills are rusty as I don't program very often anymore and I have to update a legacy program to work with SQL Server instead of Oracle.

    I didn't use parameters when I...
  21. Replies
    5
    Views
    2,268

    Re: Trouble with null value in SQL statement

    Thanks to both of you for getting my brain out of the rut it was in when I wrote the post.

    Sometimes I get writer's block, but for programmers.
  22. Replies
    5
    Views
    2,268

    Trouble with null value in SQL statement

    I have the following code:


    strWriteData = "INSERT INTO PROD.CSU_Clinic_Info(ID,Institution,Occurs,Clinic_Date,Location_Num,SID_DOC_NUM," & _
    ...
  23. Re: Regional Settings and Oracle To_Date Function

    That seems to work, but I'm not sure I understand what's really changed. The date is still in string format but instead of all together it's parsed into three pieces. Thank you by the way!
  24. Re: Regional Settings and Oracle To_Date Function

    String I thought.

    https://www.techonthenet.com/oracle/functions/to_date.php
  25. Re: Regional Settings and Oracle To_Date Function

    Appreciate the quick reply. It's stored as an Oracle DATE so today appears as:
    03/22/2017 10:58 AM
  26. Regional Settings and Oracle To_Date Function

    I wrote a program back in 2006 that's served its purpose nicely. Unfortunately, I've always struggled with regional settings. Unless the user has the short date set as "MM/DD/YYYY" the query either...
  27. Replies
    7
    Views
    1,271

    VS 2010 Removing apostrophe from text string

    I have a program that queries a database and loads data into a DataGridView. From there, I have a button that copies the datagrid data onto the clipboard where I can paste it into an Excel...
  28. VS 2010 Re: A question or two about classes and when to use them.

    Right.

    I guess I was asking when would/should I build my own. For one off programs there's no point, unless of course maybe there's something like "validate client age" in which case I could reuse...
  29. VS 2010 A question or two about classes and when to use them.

    I took a three year course in Computer Programming at a community college. We learned how to code using C++, COBOL (Ugh), VB 6.0, Java, and even had a unit on JCL/Mainframe as a lot of employers in...
  30. Replies
    21
    Views
    4,072

    Re: Finding text files on a directory.

    That's why I ended up posting on here. Too much overkill on the web. Why use four pages of code when you can use six lines? Not just limited to this particular issue either. I'll give the Dir$()...
  31. Replies
    21
    Views
    4,072

    Finding text files on a directory.

    I have a loading program which I wrote a few years ago, and I'd like to make some changes to it.

    It's only function is to load text files from a network drive into our Oracle database. It works...
  32. Replies
    3
    Views
    1,230

    VS 2010 Re: Finding a Row Within a Data Table

    It didn't care for the .ToString & "'") business that you added but I removed that, and BINGO.

    Thanks - that is a very big help.:bigyello:
  33. Replies
    3
    Views
    1,230

    VS 2010 Finding a Row Within a Data Table

    I'm trying to find a value a value within a data table based on a record I'm reading from another table.

    For example, I have a number called "PCS Visit" in my first table. While looping through...
  34. Replies
    6
    Views
    2,355

    VS 2010 Re: Combining Data from Two DataTables

    I agree with you, I'm just not sure how to get the data I need from the database in one fell swoop.

    The problem is, I need to run two queries and join them together. It can't be done in a single...
  35. Replies
    6
    Views
    2,355

    VS 2010 Re: Combining Data from Two DataTables

    I've uncovered a way of doing it - I think. My first data table contains 99% of the fields I need, I just had to run a second query to grab another column.

    When add my rows to a datagridview, I...
  36. Replies
    6
    Views
    2,355

    VS 2010 Combining Data from Two DataTables

    I have a Dataset that contains two data tables and I now need to merge them based on a "key" column which they both share.

    I'm wondering what the best way to do this is. I've researched a few...
  37. VS 2010 Best way to put a contents of a dataset into a tab delimited file?

    I have a program that queries multiple data sources, firing the results of each query into a single dataset.

    That part is working okay - I'm just now sure how best to proceed.

    I need to...
  38. Replies
    11
    Views
    5,932

    VS 2010 Re: Using a DataReader to populate a dataset

    I got it working. The data was in the datatable, but I needed to create the corresponding column in the DataGridView. Once I did that it had somewhere to put the data.

    I would have thought that...
  39. Replies
    11
    Views
    5,932

    VS 2010 Re: Using a DataReader to populate a dataset

    Thanks to you both. I have this working - almost.

    Dim OracleCommand As New OracleCommand
    OracleCommand.Connection = con
    OracleCommand.CommandText = IP_SQL
    ...
  40. Replies
    11
    Views
    5,932

    VS 2010 Re: Using a DataReader to populate a dataset

    1) I thought I wanted an empty data row to put my new record into?
    2) That's okay for testing purposes -- I'll add more cols later
    3) Thanks. The dsNRCPicker.Tables(0).Rows.Add(anyRow) seemed to...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width