Search results for query: *

  • Users: lpaul
  • Order by date
  1. L

    File Mode Question

    I am trying to see if a file is open and being used (written to) by another program before I try to read the file. And if it is I need to move to the next file. I am trying the code below but it seems to open the file and I do not want to open a file but just see if it is already open. Can...
  2. L

    Loop question

    I am needing a lot of help with this loop. What I am trying to do is find a mactch between stext and ltext by searching ghe grpts1 "seatex" that matches the grpts1 recordset and if it does not match the first recordset then it needs to move to the next recordset to do a search. Can someone...
  3. L

    Get Recordset

    When I run the GetRecordset Function I am getting "Invalid SQL statement; expected 'Delete', Insert, Procedue, select, orupdate in GetRecordset" I just trying to access data that will be used in another function in this Module. The strQuery opens the query but I can figure out what I have done...
  4. L

    Exception Error

    I found this code also which may work??? What do you think??? Private Sub btnSearchTitles_Click(sender As Object, e As System.EventArgs) ' database connection string Dim DBConnection As String = Provider = SQLOLEDB;uid = sa;password = password;database = Pubs;DataSource = local ' sql statment...
  5. L

    Exception Error

    I found this article on MSDN http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnhcvb03/html/vb03l10.asp I cut and pasted the code below in the GetREcordsetcmd but I get an error that ds is not declared. Do see how I could use this?? Dim da As New OleDbDataAdapter Dim...
  6. L

    Exception Error

    This is a VB6 conversion and this line that should show the gRs1 = GetRecordsetCmd(gRs1, strSQL, 2) Shows "Nothing"
  7. L

    Exception Error

    I did a break and stepped though - I did not see anything that tells me I am getting something returned - Please see comments by >>> Is this what I should see??? recRecordset = New ADODB.Recordset >>>>Nothing recRecordset.Open(strQuery, ConData, ADODB.CursorTypeEnum.adOpenDynamic...
  8. L

    VB6 to vb.net conversion

    I have : Dim FJobID as String Dim JobId as Integer JobID = 0 Then your code but I am getting an error on your line that says the "Length cannot be less than zero."
  9. L

    VB6 to vb.net conversion

    How would convert to vb.net ?? It is probably simple but I' can't figure out EmpID = Val(Trim(Right(FEmpID, Len(FEmpID) - 1)))
  10. L

    SQL table insert ADO

    I need help with a connection; I need to connect to a SQL table that is linked to an Access database. The database itself should be open using another connection but this code below needs to be modified as it is not working now. I am Inserting into the SQL table. I am using ADO for the...
  11. L

    Exception Error

    I was reading just now that ByRef was a vb6 standard and now that I am using vb.net do I change all of the byref's to byval????
  12. L

    Exception Error

    Did you write that GetRecordsetCmd method yourself? >>>No Do you know the difference between ByVal and ByRef? >>>No Finally, if your g1 variable is a null reference after calling that method then that method is not returning an object, so that's where your issue is. You need to debug that...
  13. L

    Exception Error

    That is really good information - thanks.
  14. L

    Exception Error

    What do I need to do to fix???
  15. L

    Exception Error

    I am getting an An unhandled exception of type 'System.NullReferenceException' occurred in test.exe Additional information: Object reference not set to an instance of an object. error on this line : g1.MoveFirst() That is below this line : g1 = GetRecordsetCmd(g1, strSQL, 2) Where do I...
  16. L

    Line input

    I have the following code that is vb6 that I need to convert to vb.net vb6 MyFile= Freefile 'Open pathnfile For Input As MyFile 'Do Until EOF(MyFile) ' Line Input #MyFile, Linetext This is how I am trying in vb.net but not sure where to place myfile: FileOpen(1, pathnfile, OpenMode.Input)...
  17. L

    Trim Mid conversion

    This is vb6 code - how would it be formated to use in vb.net to do the same??? strFJobN = Trim(Mid(strLinetext, 40, 10))
  18. L

    ADO to ADO.net

    Thanks - that helps a bunch
  19. L

    ADO to ADO.net

    How do I changes this code for ado.net??? Public Sub OpenConDatabase(ByRef sFile As String) Dim ADODB As Object On Error Resume Next gConData = Nothing gConData = New ADODB.Connection Dim OleDb As Object On Error Resume Next gConData.ConnectionString =...
  20. L

    SQL server Insert help needed

    :o How do convert this to vb.net using ADO.net - it is inserting values into an SQL table? What Imports namespaces and how do I format and connect to the server and will I still use the same Insert Into statements?? ADOCn.Open("0567_SQL_750_REPORTS", "sa", "sa") ADOCmd.ActiveConnection =...
Back
Top