User Profile
Collapse
-
Thank you Plater that was the answer. Sorry Jerry you gave me the answer earlier and I missed it. I didn't realize the % replaced the *. Thanks everybody for all your help. -
I've been playing with this and I think I've narrowed it down to the wild card character. Here is my Code
[code=vbnet]
Dim CaddTxtFile As String = "C:\WINDOWS\Tem p\Acad_Log_Out. txt"
Dim CaddFile As String, SqlTxt As String
Dim dSet As New DataSet
Dim dAdapter As OleDb.OleDbData Adapter
Dim TxtStream As New System.IO.Strea mReader(CaddTxt File)
CaddFile = TxtStream.ReadL ine...Leave a comment:
-
-
Here is the Sql String that is compiled by the code.
[code=vbnet]
SELECT CADD_File_Name, Drawing_Number, Drawing_Title
FROM Drawing_Log
WHERE CADD_File_Name LIKE 'C1130*'
[/code]
I would have prefered 'C1130*' to be "C1130*"
But am unsure how to do this and the sql works in access with the single quote vice the double quote.Leave a comment:
-
If I change that then what do I change line 20 to to get the information back out of the dataset. Besides My code works fine if i comment out
[code=vbnet]
& " WHERE CADD_File_Name LIKE '" & CaddFile & "'"
[/code]Leave a comment:
-
Why doesn't this sql statement work
I am having difficulties with the following code. When I run it I get a zero length table but if I copy the sql statement out of the third text box go into access and paste it into the sql view and run it I get the one record I’m looking for.
[code=vbnet]
Dim CaddTxtFile As String = "C:\WINDOWS\Tem p\Acad_Log_Out. txt"
Dim CaddFile As String, SqlTxt As String
Dim dSet...Last edited by Plater; Sep 3 '10, 05:57 PM. -
I converted the code from vb6 to vb.net using the upgrade wizard and compiled it. I still get the same error trying to access the new dll as I did with the original dll.Leave a comment:
-
How do you write a 64bit dll using Visual basic 2008 Express
I currently have a dll written w/ VB 6. The problem is my office upgraded to 64bit windows XP and the dll won't work. from what I have found it apears I need a 64bit dll. but am having trouble creating one. Any help would be appreciated. -
you can set Cancel to 1 in the form_unload and the form will not close.
Just be sure to put it in an If Satement so that you can close the form.Code:Private Sub Form_Unload(Cancel As Integer) Cancel = 1 End Sub
Leave a comment:
-
What Version of VB are you using?
What is your code for showing the modal forms?
What is your code for Closing the Modal forms?Leave a comment:
-
where is that pesky subscribing button.
BTW Nifty Trick kadghar.Leave a comment:
-
You could try modifying this...
[CODE=vb]
Dim Str As String, Str1 As String
Select Case Right$(Format(N ow(), "d"), 1)
Case Is = "1"
Str1 = "st"
Case Is = "2"
Str1 = "cnd"
Case Is = "3"
Str1 = "rd"
Case Else
Str1 = "th"
End Select
Str = Format(Now(),...Leave a comment:
-
Just Select the files you wish to compress, Right Click and send to a compressed (zipped) folder.
at least that is how it works in windows xp pro....Leave a comment:
-
Why would you need two loops Just try:
[CODE=vb]
For i = 0 to UBound(arrTwo, 1)
arrTotal(i,0) = arrOne(i)
arrTotal(i,1) = arrTwo(i)
Next
[/CODE]Leave a comment:
-
[QUOTE=nico3334]I'm filling in a Report with SQL data using VB code. I'm using LOOP and MoveNext......Q UOTE]
The first thing I would Note is that you are not setting “strData” After the first Record. Next I would recommend setting “strDataPrev = strData” after you check to see if they are equal as apposed to moving backwards and forwards through the table.Leave a comment:
-
You could also reverse your Loop to work from the back of the workbook to the front....Leave a comment:
-
By all means. Thanks for asking, but I figured when I posted it that people would use and modify it....Leave a comment:
-
For testing purposes (or at least this is what I was taught) the RND() function goes in a set order so it will give the same numbers every time it is run until you use Randomize.
Yes, you can but I was taught to use the keyword Call in school and it has become habit....Leave a comment:
-
or you could just place the following in your form load
[CODE=vb]call randomize[/CODE]Leave a comment:
-
This is the VB6 Code. Note that I did this as a school project for an intermediate Visual Basic class at a community college. I was unfortunate enough, or maybe just that unlucky, to take the basic class in VB 6 and the Intermediate class in VB.Net do to a change in the college. As a result I started my final project in VB 6. This code is poorly commented. I did the final code in VB.net so this code may not be complete. Hope it is some help.
...Leave a comment:
No activity results to display
Show More
Leave a comment: