Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




DSN Not Found Error


My VB application uses the Access data base which is in a Server, thro' a DSN. Using Distribution & Deployment wizard, this VB application is made in to a Package and installed in some other machine. When running the programme in that machine, an error message occurs saying 'DSN is not found'. What are the various possiblities to solve this problem?Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Microsoft Visual Basic File Not Found Error When Openining Excel. Error 53
Hi

I am getting the below message each time I open excel:

Microsoft visual basic File not found error when openining excel. Error 53



What is it,What caused it and how do I get rid of this message when I open excel.


I have a series of macros in VBA and a VB6.0 application.


Many thanks

File Not Found Error
I wrote a small program to analyze a group of associated files and display information extracted from them.

I built into the program the ability to accept a command line argument of the base file name and open with a data set displayed.

I ran into a problem where the command line processing resulted in a file not found error when a file name was dragged from Windows explorer and dropped on the desktop icon for the program.

After some effort at debugging, I found that the problem occurs when the file path I drag and drop contains a space, e.g., part of the path is "C:Program Files...". If I eliminate the space in the file name, the error does not occur.

Yet, if I insert the SAME path name in the development environment, I do NOT get the error. The error only occurs when I drag and drop the path name on the desktop icon and the path name contains a space.

Also, if I select the path name containing a space via the common dialog control, the error does not occur in either the IDE or the executable file.

Does anyone have an explanation for this?

Error 53 File Not Found
a programmer is programming a program for me in visual basic which self-deletes on exit and sometimes (not every time) on exit the file won't delete and there will be an error that says "error 53 file not found". The file does exist since it's an intermittent problem and if you try again it works.

I did some research on this and advised him to add a delay to slow the script down but, the error still occurs intermittently.

Does this mean the delay just needs to be longer?

I've only noticed this on Vista and haven't noticed this error on XP. It is an intermittent problem but, it always occurs atleast 1 out of 10 times.

any advise would be appreciated.


Thanks

File Not Found Error
Hi All,

This is a funny one though I'm pretty certain it is a network security issue. My scenario is thus:

I have a VB6 app which accesses an Access db stored on a SBS 2003 Sever. It also creates and saves Word docs onto the server. This is all working fine. However the issue I have is when I try to open the Word docs using the VB app. Here I am getting the "File Not Found" error.

I have two pcs networked to the server, a laptop and a pc. The Pc has Win XP Pro while the Laptop has XP Home Edition. It is with the laptop I see the problem. The pc works perfectly.

Both laptop and pc have a mapped drive to a folder on the server in which the db and files are stored. This needs to be accessed with a username and password upon logging onto the pcs (share was already created this way by hardware eng).

Needless to say, I can manually navigate to the shared folder on the server and open anything I want. It is just with the automated process in the VB app that I see the problem. I have confirmed that the file path and file name are correct.

Just to add, the laptop does not have a secured user log in. When the laptop boots, you simply click on a profile and off you go. Also, the laptop is not set up as a manged computer on the server.

So here's my question: How is it I can create and save the word docs to the shared drive on the server but not open these files? Does it come down to shared drive security issues and most importantly, can it be overcome?

I hope this is explained well and that someone might have a suggestion/answer?!

Thanks All,
GB

Path Not Found Error When Run On Xp
My program works fine with windows 98 2000 but is giving runtime error 76 Path Not Found when run on xp. I do not have access to the machine so I cant debug but am assuming the problem is with the FSO or ADOX commands I am using to copy and update files. I havent written anything for xp b4. Heres my current code. Do I have to use different code for xp?

btw QLink comes from a commondialog control

Dim copyTo As String, QLink As String
Dim fso As New FileSystemObject, fl As File
Dim pth As String, x As Integer
Dim wShell As New WshShell, sct As WshShortcut, dtp As String
copyTo = "C:ClientsClients v03.mdb"
QLink = lblPath.Caption

If optUA = True Then
GoTo UserApp
End If

'if Datastore file already exists check if should be replaced
'if no goto main if yes rename existing
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(QLink) = True Then
If MsgBox("A datafile '" & QLink & "' already exists are you sure you want to overwrite it?", vbYesNo, "") = vbNo Then
MsgBox "Installation Cancelled", , ""
Exit Sub
Else
Splash.Show
a = Str(Day(Date) & Month(Date) & Year(Date))
b = Str(Hour(Time) & Minute(Time))
If fso.FileExists(QLink & a & b) = False Then
fso.CopyFile QLink, QLink & a & b, True
End If
fso.DeleteFile QLink, True
End If
End If

'if path does not exist create it
x = InStr(1, StrReverse(QLink), "")
pth = Left(QLink, Len(QLink) - x)
If fso.FolderExists(pth) = False Then
fso.CreateFolder pth
End If

'copy datastore file
fso.CopyFile App.Path & "SetUpFilesClients Data.mdb", QLink, True
Set fl = fso.GetFile(QLink)
fl.Attributes = Normal

GoTo Done

UserApp:
Splash.Show
'if FE file already exists rename
If fso.FileExists(copyTo) = True Then
a = Str(Day(Date) & Month(Date) & Year(Date))
b = Str(Hour(Time) & Minute(Time))
If fso.FileExists(copyTo & a & b) = False Then
fso.CopyFile copyTo, copyTo & a & b, True
End If
fso.DeleteFile copyTo, True
End If

'copy user app file
fso.CopyFile App.Path & "SetUpFilesClients v03.mdb", copyTo, True
Set fl = fso.GetFile(copyTo)
fl.Attributes = Normal

'update link to datastore
Dim catDB As ADOX.Catalog
Dim tblLink As ADOX.Table
Set catDB = New ADOX.Catalog
' Open a catalog on the database in which to refresh links.
catDB.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & copyTo
For Each tblLink In catDB.Tables
' Update datasource for all linked tables.
If tblLink.Type = "LINK" Then
tblLink.Properties("Jet OLEDB:Link Datasource") = QLink
End If
Next
Set catDB = Nothing

'create shortcut on desktop
dtp = wShell.SpecialFolders("Desktop")
Set sct = wShell.CreateShortcut(dtp & "Clients v03.lnk")
sct.TargetPath = copyTo
sct.Save

File Not Found Error
I have a VB program, which runs flawlessly, installed on several Win98 machines (its database is on our LAN server). I reconfigured the installation so that it would run on Win2000 machines, which it does. The problem is this, when any Win2000 machine that has the program on it is rebooted, and the program is again launched, a file not found error occurs. If no reboot is done, the program can be exited and rerun day after day without any problems -- only a reboot will lead to the error.

I've checked all the networked drives after experiencing the error, and they all seem to be pointing to their proper network directories. I'm unsure why a reboot would cause such a disruption...any ideas?

Thanks

ps. Win98 machines can reboot without the program being the least bit affected.

File Not Found Error
filename is a textbox on the form where user inputs a filename




Code:
Dim inputFileNum as integer
inputFileNum = FreeFile
Open FileName.Text For Input As #inputFileNum
file exists in the same folder as the program......

any ideas?

File Not Found (Error 53)
Situation: I have a class file reading input from a text file, when I compile in into a Dll I'm gettin the ol'Error 53 File Not Found

When I tested the project before creating the Dll and setting a reference to it for the exe all was well, the error occured after the dll was compiled? Any thoughts..

The Exe and Dll operation is fine except for the part of getting external data from my text file...other unrelated methods. etc...are working ok

Thanks

Brent

Error: Provider Cannot Be Found...
1) When I test my code, I get an error msg that says

"Runtime error 3706, Provider cannot be found. It may not be properly installed."

I used MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB .4.0;" & _
"Data Source = D:VBdb1.mdb"

How do I know if it is not properly installed? Do I have to reinstall anything?

2) Is there anything wrong in the following code?
frmSearch.Show vbModal
'Create SQL statement to search
SQL = "SELECT * FROM Invoices WHERE Name LIKE '" & frmSearch!txtName.Text & "%'" & _
" OR Company LIKE '" & frmSearch!txtCompany.Text & "%'" & _
" OR No = '" & frmSearch.txtNo.Text & "';"
Unload frmSearch

I use Windows 2000 Pro
Visual Studio 6.0

Thanks.

Error 53 File Not Found
a programmer is programming a program for me in visual basic which self-deletes on exit and sometimes (not every time) the file won't delete on exit and there will be an error that says "error 53 file not found". The file does exist since it's an intermittent problem and if you try again it works.

I did some research on this and advised him to add a delay to slow the script down but, the error still occurs intermittently.

Does this mean the delay just needs to be longer?

I've only noticed this on Vista and haven't noticed this error on XP. It is an intermittent problem but, it always occurs atleast 1 out of 10 times.

any advise would be appreciated.


Thanks

Vb6 Error 76, Path Not Found
I get "runtime error 76 Path not found" when I try to display a picture from a camera to a vb6 form. I am using a Kodak digital camera 6.1. (a) I do not want to save the picture to a file, I just want to be able to display it on a form.
Here is the code. The camera is plugged into a slot on a Pc


Private Sub CmdShowPicture()
Picture1.Picture=LoadPicture("Computerz650 Zoom digital Camera Removable storage")
end sub
Been struggling with this for a while
Any help will be appreciated
al

Item Cannot Be Found Error
Why is it that Im getting this error? Item cannot be found in the collection
corresponding to the requested name or ordinal
Below are my codes.

On Form_load:

Code:
Private Sub Form_Load()
Call openConnection
Me.Left = LeftPos - 200
Me.Top = TopPos - 200

Set rsStockOut = New ADODB.Recordset
Set rsClient = New ADODB.Recordset
rsStockOut.CursorLocation = adUseClient

sSQL = "SELECT tblStockMasterFile.ProductID, " & _
"tblStockMasterFile.ProductName, " & _
"tblStockMasterFile.Unit, " & _
"tblStockMasterFile.ReOrderPoint, " & _
"tblStockTransFile.EntryDate, " & _
"tblStockTransFile.pSequence, " & _
"tblStockTransFile.PurchasePrice, " & _
"tblStockTransFile.Quantity, " & _
"tblStockTransFile.Reason, " & _
"tblClientMasterFile.ClientName, " & _
"tblClientMasterFile.ClientCode , " & _
"tblClientMasterFile.Budget " & _
"FROM tblClientMasterFile INNER JOIN " & _
"tblStockTransFile ON " & _
"tblClientMasterFile.ClientCode = tblStockTransFile.ClientCode INNER JOIN " &

_
"tblStockMasterFile ON " & _
"tblStockTransFile.ProductID = tblStockMasterFile.ProductID"

If rsStockOut.State = adStateOpen Then rsStockOut.Close
rsStockOut.Open sSQL, oConn, adOpenStatic, adLockOptimistic

Call FillcboClient
Call LockFunction(frmStockOut, "TextBox")
lstStockOut.Enabled = False
End Sub 'Form_Load


The Function FillcboClient:

Code:
Private Sub FillcboClient()
cboClientName.Clear
cboClientName.AddItem "- Type or Select -"

'TODO : Fill cboAuthorID
'-------------------------------------------------------------------------------------
sSQL = "SELECT ClientCode, ClientName FROM tblClientMasterFile"
'this what i mean for 1 trip..u open the rs just one time

If rsClient.State = adStateOpen Then rsClient.Close
rsClient.Open sSQL, oConn, adOpenStatic, adLockOptimistic

If Not rsClient.BOF And Not rsClient.EOF Then
rsClient.MoveFirst

While rsClient.EOF = False
cboClientName.AddItem rsClient("ClientName").Value
rsClient.MoveNext
Wend
cboClientName.ListIndex = 0
End If
'-------------------------------------------------------------------------------------
End Sub


Product ID Change event:

Code:
Private Sub txtProdID_Change()
txtProdQtyOut.Text = ""

'Use for Barcode reader
' If InStr(1, txtProdID.Text, "*") = Len(txtProdID.Text) Then
' txtProdQty.SetFocus
' End If

If rsStockOut.State = adStateOpen Then rsStockOut.Close

On Error Resume Next
If txtProdID.Text <> "" Then
rsStockOut.Open "SELECT * FROM tblStockMasterFile WHERE ProductID = '" & txtProdID.Text

& "'", oConn, adOpenStatic, adLockOptimistic

If rsStockOut.RecordCount <> 0 Then
txtSupply.Text = rsStockOut.Fields("Quantity")
txtProdName.Text = rsStockOut.Fields("ProductName")
Else
'txtSupply.Text = ""
txtProdName.Text = ""
End If
Else
txtSupply.Text = ""
txtProdName.Text = ""
End If
End Sub 'txtProdID_Change


The cboClientName Change event: The call ReplaceQuotation Function is not working here but in my other forms the same code is perfectly working.

Code:
Private Sub cboClientName_Change()
txtClientCode.Text = ""

'if user click this..then search for the appropriate record then _
display the Client Code in the textbox
sSQL = "SELECT ClientCode, ClientName FROM tblClientMasterFile " & _
"WHERE ClientName='" & cboClientName.Text & "'"

If rsClient.State = adStateOpen Then rsClient.Close
rsClient.Open sSQL, oConn, adOpenStatic, adLockOptimistic
' Call ReplaceQuotation(cboClientName)

'display the Client Code in the textbox
If rsClient.BOF = False And rsClient.EOF = False Then
txtClientCode = rsClient.Fields("ClientCode").Value
End If
End Sub 'cboClientName_Change


The Add Button: the highlighted parts is where the error points.

Code:
Private Sub cmdAddItem_Click()
Dim lst As ListItem

If txtProdID.Locked = True Then
txtProdID.Locked = False
End If 'txtProdID lock

If lstStockOut.Enabled = False Then
lstStockOut.Enabled = True
End If

If CheckNullValue = False Then Exit Sub

Set lst = lstStockOut.ListItems.Add(, , txtProdID.Text) 'DISPLY IN LISTVIEW
lst.SubItems(1) = txtProdName.Text
lst.SubItems(2) = txtProdQtyOut.Text
lst.SubItems(3) = Format$(rsStockOut.Fields("PurchasePrice"), "###,###,##0.00") 'Capital
lst.SubItems(4) = Format$(lst.SubItems(3) * 1.15, "###,###,##0.00") 'Selling Price
lst.SubItems(5) = Format(lst.SubItems(2) * lst.SubItems(4), "###,###,##0.00") 'Total

txtProdID.Text = ""
txtProdQtyOut.Text = ""
txtProdID.SetFocus

Set lst = Nothing 'destroy the list
End Sub 'cmdAddItem_Click

Can someone please tell me what am i missing here?
I have attached here my table relationships
Any help is much appreaciated and thank you very much in advance.

Cek File With Dir(...) Found ERROR
i have code like this :


VB Code:
If Dir(Format$(filePath)) Then        cekFileDir = True            Else        cekFileDir = False    End If



filePath value is "C:Documents and SettingsGrandongMy DocumentsYHInventorysrcinventory.conf"

and the value there on directory.

but when i run my program i found error : Type mismatch

what is wrong with my code ?

Error 53 Dll File Not Found
I am having a strange error when debugging my program.
Strange, because it only occurs when I am debugging in the IDE and not when the program is compiled.
(this is on a Win2K PC)

I have a Fortran DLL, so it does not need registering and I am declaring it like this:
VB Code:
Declare Sub leastsquares Lib "c:codelinearsolvers.dll" (matrix As Double, righthandsides As Double, _            m As Long, n As Long, ifail As Long, solution As Double)

When I use Sysinternals File Monitor, it says that VB is looking for the dll in
C:Program FilesMicrosoftVB98
C:codedbfilemon
c:winntsystem32
c:winnt
...everything else in my PATH directories

Why does it do this and not just go directly to the full path in the declare statement?
Like I said at the beginning, when it is compiled this doesn't occur.

I can work around it by removing the full path and putting the dll in the SYSTEM directory,
but I am interested to know why the IDE doesn't look in the full path in the declare statement.

Path NOT Found Error #76
Hi this is my first time using this thread to actually get help for my problem from VB HELL. I have the following excerpt of my code below and im using it to obtaine the pictures from USER ACCOUNT PICTURES:

Dim fso As New FileSystemObject
Dim Path_to_Folder As String
Dim Path_Info_to_Pass As String

Path_to_Folder = Left$(App.Path, InStrRev(App.Path, "", InStrRev(App.Path, ""))) & "All Users.WINDOWSApplication DataMicrosoftUser Account Pictures"

Path_Info_to_Pass = Path_to_Folder

****** NOTE ***********
'_______________________________________
Call Get_Files(fso.getfolder(Path_Info_to_Pass))
'_______________________________________

As soon as i get to the above line, i get error # 76 "Path not found"

I dont understand why this keeps getting generated. Although when hard-code the whole sections like below:


Dim fso As New FileSystemObject
Dim Path_to_Folder As String
Dim Path_Info_to_Pass As String


******* NOTE **********

'______________________________________________

'Path_Info_to_Pass = "C:Documents and SettingsAll Users.WINDOWSApplication DataMicrosoftUser Account Pictures"

'______________________________________________

Call Get_Files(fso.getfolder(Path_Info_to_Pass))


When i hard-code the path above, VB does not generate any errors. My problem is that i dont want to hard-code the path because the USER ACCOUNT PICTURES can be somewhere else. Can someone please tell me what im doing wrong? Thanks in advance.

PDW Error - SETUP.EXE Not Found
When I try to package a vb project, I choose the dir to make the package, and click next. I then get an error message that says: "These files are needed for this package but cannot be found. Click browse to locate the file"

and its looking for SETUP.EXE

Why? I don't know what to browse to

No Export DLL Found Error
Can any one help to fix this problem
I have just finished a VB project which includes reports written with Crystal Reports ( Specifically Crystal Components )
The Report run perfectly on my PC.
I have used default VB packaging to get package the application and write it to Cd.
On installation on a similar windows 2000 nachine the application runs fine.
The other reports also run EXCEPT the report in which I have the option Report.Export specified.

The system returns the error

"Runtime Error 2147190909 No Export DLL's Found"

1. Which DLL do I need to export from my development PC to the production PC

2. How do I register the DLL

Thanks

Error 53 File Not Found
Ok i am making a skin editor for my own mp3 player i made a setup file for it.. and it has all the needed files in it..
now when i install it and put a skin in the directory of the editor.. it opens it perfectly...

But when he installs it and inserts accetly the same skin (or another) it will just not work it gives an RUNTIME ERROR 53: File not found...
but it doesnt say wich one it is missing.. is there a way to make the program tell me what is wrong? or can somebody tell me if this is a program file or a skin file!

File Not Found Error
I have a file on a network that i access with my program,
it runs fine when i execute it. It runs fine if i put it in start up.

However, if i run it through the registry as a service, or through system.ini as a shell, it says file not found.

I think that its because the computer takes too long to connect to the network and therefore cant find the file

Atm, the network obtains ips automatically, and often the network goes to sleep for an undetermined amount of time (when i bombard it).

any ideas?

thanks in advance,


aal04

Found Error In My Code!
Hey, figured out the line of code that kept causing my error.


Code:
ListView2.SelectedItem = ListView2.ListItems(random)


What I'm trying to do is select a random item in my listview via code. If anyone can explain my error, It would be appreciated.

File Not Found Error
Hi, I tried to copy a file from C:My Documents est.mdb to
C:My DocumentsNORA using VB.
I used code like this:

Dim a as string
a="C:My DocumentsNORA"
filecopy "C:My Documents est.mdb", a

I am getting error "File not found"
I checked the path, my path is correct.

Could anyone tell me what's the error?

Thanks

Error 48 File Not Found
In my program I call a dll. Everything works fine.
I then decide to make some major changes to the user interface and test them out, so I copy all the source files to a different computer.

Now before I make the changes I try to run the program from with the project (F5). I get 'ERROR 48 file not found' when it reaches the dll call.
Yet when I check the path specified, the dll _IS_ there.
If I compile the program and run the excecutable, this problem doesnt occur. It also doesnt occur on the original machine.

Has copying the source code to a different machine caused this? If so, how can I get around this/fix it without doing the changes on the original machine. (I am often taking the files home to work on them)

/Andrew

File Not Found Error (Get Rid Of)
I get a file not found sometimes and it shutdowns my application... How could I tell the program to say "file not found" in a list box, and get rid of the file not found error message that pops up... Also what is the code for a command button to clear data in a list box?

Path Not Found (Error 76)
I am trying to learn to save a string from a text box so that the if the text changes the text box will show the new text after the Application has closed and reopened the new text will be displayed. I found a way to do what I want by reading and writing to and from files and displaying the strings in the text boxes. It worked fine both using run in VB5 and compiling the application using "Make .exe". But after using the Setup Wizard I got an error, path not found (Error76).
I double checked the path and file names in both the Application and the path where Setup Wizard placed the files. They are the same.
Can someone help?

Path Not Found (Error 76)
My application works inside VB5 and after I compiled the Application and ran it as an .exe file it worked fine. But after I used Setup Wizard and tried to run the .exe file from the path it was loaded to it comes up eith "Path not found (Error 76). I have double checked the path and file names in the application and where the files are located. They are the same. C:Program FilesSaveSave.exe

I could use some help.

File Not Found Error
If I want to make sure that a file will be created, say program.txt, if it's not in the place it should be, how could I create it instead of getting error File Not Found?

Unicows.dll Not Found Error
Good morning everyone,

I was wondering if anyone has a solution to this error. I am using vb6 and
crystal report 10. I tried all the solutions from other forums without any
luck. I installed the latest version of the dll into crystal decision bin
directory, not working...And tried many other solutions to no avail...

Also when trying to register the dll I get error 0x00000485...

Any idea would be welcome,

thanks

License Not Found Error
I have inherited a VB/SQL program that I have been directed "to understand and be able to update ASAP".  Unfortunately, I am a fairly "green" programmer and have run into this error.  I think it is tied to the use of threed32.ocx.  Any ideas or direction?

Run-time Error '48' DLL Not Found
What am I missing? I have declared a function in a module that references a DLL. When I call the function, I get this error (the file name is included in the error message). The DLL resides in the same directory as the project.

I am new to using DLLs in my programs, so I am sure I am missing something pretty simple. I don't know if I need to run regsvr32 or not, so I thought I would try it and see what happens then. Regsvr32 returns with an error message of x00000485.

The DLLs were delivered with some hardware, and the test application they sent with it works fine.

Item Cannot Be Found...Error
I get this error
Item cannot not be found in the collection corresponding to the requested name or ordinal.

I know that it supposed to mean that the field doesn't exist in my table...but it does...I copy and pasted the name and I rechecked and it's the same name,
After that I checked if I had record in this field. I do...So How can I solve my problem? I just want to add two item in my combo box.
Thanks in advance.
This is my code
    
Set RsQuotTemp = MyConn.Execute("select distinct noquotation from Tblquotation where nocustomer = " & Me.MSFGCustomer.text)
    If Not RsQuotTemp.EOF Then
    MsgBox (RsQuotTemp("QuotationLabel"))
                                       
      While Not RsQuotTemp.EOF
        Me.CmbQuotations.AddItem (RsQuotTemp("NoQuotation") & " / " & RsQuotTemp("QuotationLabel")) 'Ajoute les Quotations creer par ce client dans le combo box
        RsQuotTemp.MoveNext
      Wend

Sub Main Not Found Error.
Hi Folks,

I wonder what I need to do.

I make a REAL simple design,

One losuy form that has an allocated 'Name' property - Form1

I build solution without an issue.

However, if I change the 'Name' property to say... "Adder" and do the
same build I will receive an error:

'Sub Main' not found was not found in 'Adder.Form1'

I can't find any reference to 'Adder.Form1' nor Sub Main.

How would I correct the thing, rather than accept "FORM1" as a
permanent 'Name' property value. Can I not change any of the Form
names as I choose?

Thanks -- paul

Path Not Found, Error '76'...
Hi everyone...

In my formload event I have this code pointing to the drive c:

Code:dirDirectory.Path = "c:Program FilesIVA Media"

Under what conditions could I get the afformentioned error?

I have tried it on two different machines with no problems. On another members machine here, the error appeared...

Any ideas...

Thanx

D-Race



Edited by - D-Race on 4/28/2005 3:00:37 AM

Getting A DataField Not Found Error
Hi,
I've tried to do a hierarchical Datareport without using the DataEnvironment. When I run the code I get an error "DataField LeagueName Not Found". Here is the code:

Dim rsCountries As New ADODB.Recordset
    Dim rsLeagues As ADODB.Recordset
    Dim rsBets As ADODB.Recordset
    Dim sShape As String
    Dim tmpDate As String
    
    tmpDate = Right("0" & txtMatchDate.Month, 2) & "/" & Right("0" & txtMatchDate.Day, 2) & "/" & txtMatchDate.Year
    Dim conSrc As New ADODB.Connection

    Dim cmdBetsCountries As New ADODB.Command
    Dim rsAllCountries As New ADODB.Recordset
    Set cmdBetsCountries.ActiveConnection = mDbSession.GetConn
    cmdBetsCountries.CommandText = "SELECT DISTINCT(COUNTRIES.CountryId), COUNTRIES.CountryName " & _
                            "FROM BET, LEAGUES, COUNTRIES " & _
                        " WHERE BET.MatchDate = ? AND " & _
                        " BET.LeagueId = LEAGUES.LeagueId AND " & _
                        " COUNTRIES.countryId = LEAGUES.countryId " & _
                        " ORDER BY COUNTRIES.CountryId"

    cmdBetsCountries.Parameters.Append cmdBetsCountries.CreateParameter("matchDate", adDate, , , tmpDate)

    Set rsAllCountries = cmdBetsCountries.Execute

    Dim cmdBetsLeagues As New ADODB.Command
    Dim rsAllLeagues As New ADODB.Recordset

    Set cmdBetsLeagues.ActiveConnection = mDbSession.GetConn
    cmdBetsLeagues.CommandText = "SELECT DISTINCT(LEAGUES.LeagueId), LEAGUES.LeagueName " & _
                                " FROM BET, LEAGUES " & _
                                " WHERE BET.MatchDate = ? AND " & _
                                " BET.LeagueId = LEAGUES.LeagueId AND " & _
                                " LEAGUES.countryId = ? "

    cmdBetsLeagues.Prepared = True
    cmdBetsLeagues.Parameters.Append cmdBetsLeagues.CreateParameter("matchDate", adDate, , , tmpDate)
    cmdBetsLeagues.Parameters.Append cmdBetsLeagues.CreateParameter("countryId", adInteger)

    Dim cmdBets As New ADODB.Command
    Dim rsAllBets As New ADODB.Recordset

    Set cmdBets.ActiveConnection = mDbSession.GetConn
    cmdBets.CommandText = "SELECT BET.BetId, BET.KOT, " & _
                            "TEAMSA.TeamName AS TeamNameA, TEAMSB.TeamName AS TeamNameB " & _
                                " FROM BET, TEAMS AS TEAMSA, TEAMS AS TEAMSB " & _
                                " WHERE BET.MatchDate = ? AND " & _
                                " BET.LeagueId = ? " & _
                                " ORDER BY TEAMSA.TeamName"
    cmdBets.Prepared = True
    cmdBets.Parameters.Append cmdBets.CreateParameter("matchDate", adDate, , , tmpDate)
    cmdBets.Parameters.Append cmdBets.CreateParameter("leagueId", adInteger)

    conSrc.Open "Provider=MSDataShape;Data Provider=NONE;"

    sShape = "SHAPE APPEND NEW adInteger AS CountryId, NEW adVarChar(255) AS CountryName," & _
                "((SHAPE APPEND NEW adInteger AS LeagueId, NEW adInteger AS CountryId, NEW adVarChar(255) AS LeagueName," & _
                "((SHAPE APPEND NEW adInteger AS BetId, NEW adInteger AS LeagueId, NEW adVarChar(255) AS TeamA, NEW adVarChar(255) AS TeamB, NEW adVarChar(5) AS KOT, " & _
                "NEW adInteger AS HomeRate, NEW adInteger AS DrawRate, NEW adInteger AS AwayRate ) AS BETS RELATE LeagueId TO LeagueId)) AS LEAGUES RELATE CountryId TO CountryId)"

    Dim cmdBetRate As New ADODB.Command
    Dim rsBetRate As New ADODB.Recordset

    Set cmdBetRate.ActiveConnection = mDbSession.GetConn
    cmdBetRate.CommandText = "SELECT TOP 1 HomeRate, DrawRate, AwayRate " & _
                            " FROM BET_RATE " & _
                            " WHERE BET_RATE.BetId = ? " & _
                            " ORDER BY RateDate DESC, RateTime DESC"

    cmdBetRate.Parameters.Append cmdBetRate.CreateParameter("bedId", adInteger)

    With rsCountries
         .Open sShape, conSrc, adOpenStatic, adLockOptimistic, -1

    While Not (rsAllCountries.EOF)
        .AddNew
        !CountryId = rsAllCountries("CountryId")
        !CountryName = rsAllCountries("CountryName")
        .Update

        cmdBetsLeagues("countryId") = rsAllCountries("CountryId")
        Set rsAllLeagues = cmdBetsLeagues.Execute

        Set rsLeagues = .Fields("LEAGUES").Value

        With rsLeagues
        While Not (rsAllLeagues.EOF)
            .AddNew
            !LeagueId = rsAllLeagues("LeagueId")
            !countryId = rsAllCountries("CountryId")
            !LeagueName = rsAllLeagues("LeagueName")
            .Update

            Set rsBets = .Fields("BETS").Value

            cmdBets("leagueId") = rsAllLeagues("LeagueId")
            Set rsAllBets = cmdBets.Execute
            While Not (rsAllBets.EOF)
                rsBets.AddNew
                rsBets("BetId") = rsAllBets("BetId")
                rsBets("KOT") = Right("0" & Hour(rsAllBets("KOT")), 2) & ":" & Right("0" & Minute(rsAllBets("KOT")), 2)
                rsBets("TeamA") = rsAllBets("TeamNameA")
                rsBets("TeamB") = rsAllBets("TeamNameB")
                rsBets("LeagueId") = rsAllLeagues("LeagueId")

                cmdBetRate("bedId") = rsAllBets("BetId")
                Set rsBetRate = cmdBetRate.Execute
                If Not (rsBetRate.EOF) Then
                    rsBets("HomeRate") = rsBetRate("HomeRate")
                    rsBets("DrawRate") = rsBetRate("DrawRate")
                    rsBets("AwayRate") = rsBetRate("AwayRate")
                End If
                rsBets.Update
                rsAllBets.MoveNext
            Wend
            rsAllLeagues.MoveNext
        Wend
        End With
        rsAllCountries.MoveNext
    Wend
    End With

    Set DROdds.DataSource = rsCountries
    DROdds.DataMember = rsCountries.DataMember
    DoEvents

    DROdds.Show

I've got a code which is doing exactly doing the same thing and the other one works. I cant figure out why this one is not working.

Thanx in advance,

Selven

Error! Index Not Found...
Hi to everyone,

Any idea with regards to this matter specially to all (guru).
I have a vb6 application which my database format is .mdb but all the tables are linked into .dbf format. When i run my program an error appears "Index not found". Im trying to linked the tables in our server (Windows NT).
Thank you in advance...

File Not Found Error
I am getting error 54, file not found error on the following line.

Shell "start file:///c:AppsphoneList.html", vbHide

But there is a file called PhoneList.html on the C:Apps folder. Does anybody know why I am getting this error or how can I fix this?

Error 53 File Not Found Problem
Hi,
and am using the Drive, Folder, and File list box objects in my form so a user can select the file to open.
I use the following code to synchronize these objects

Private Sub lstDir_Change()
lstFile.Path = lstDir.Path
End Sub
Private Sub lstDrive_Change()
lstDir.Path = lstDrive.Drive
End Sub

I store the selected file and path in a variable

strFullPath = lstDir.Path & lstFile.FileName

when I check the contents of strFullPath variable in debug mode it contains a proper file path name that I have full permissions on and the path name is surrounded by double quotes

but when I use this variable in the Open statement I get the error 53 "file not found" if I hard set the path in the Open statement it works okay. My open statement is as follows
Open strFullPath For Input As #1

I am not sure what I am doing wrong here. Thanks for any help you can provide to help me solve this.

Automation Error - The Specified Module Cannot Be Found
HI!! i am using class module in my project and after making exe ( without using p & d) when i run the exe on my machine it works fine, but when i run the exe on other machine it gives the error ' automation error - the specified module cannot be found'. any vb expert it will be a great on your part if you can help me ... thanks

Urgent Help! Error 432 Class Name Not Found
Hi!

i'm starting to be really desperate. I've a problem with the application's instalation setup i've made. I know this is not the suited forum for this but i've trying to fix it for one day and i've succed

Problem is:

I made an instalation setup with inno of an application that already worked in vb ide. So i installed the prog in the same computer where i developed.
Then when i ran the program i get this error :

error 432 file name or class name not found during automation operation

What's happening here? Something wrong in the setup file?


Help please!

Compile Error - Object Not Found
Hello,

I am writing macros for coworkers and when files are emailed around occasionally the Compile Error appears. Upon investigation VBA stops recognising commands that worked in original programming eg.
Msgbox and xlUp

The file acts like is is not linked to the VBA Object Reference which of course it is on review.

The only way I've found around the problem is to Copy - Paste Special values to a working copy of the workbook. A PAIN for users.

Is there a way to fix the original sheet? or better yet ensure the 'connection' on workbork activation?

Runtime Error 53 File Not Found
Hi there! i have created a form that enables a user to input a host name and message, and the computer will net send the host. but the problem is, if the user is not signed in to the domian, net send doesnt send a msg and my program crashes. i was wondering if anyone could give me some help with this. here is what i have so far:

Option Explicit
Private FileName as string

Private Sub cmdFileName_Click()
FilePath = InputBox("Please input the desired File Name", "File Name")
If FileName= "" Then
MsgBox "Please enter a File Name", vbExclamation, "ERROR!!!"
Else
Shell FilePath
End If
End Sub

I believe that i may have to use an if statement or maybe if some code that checks the program for errors and if there is one, it restarts the form...but i am not sure exactly what it is. any help would be awsome...thank you in advance...

Vb6 -runtime Error '53' File Not Found
Hi, I'm a novice programmer. I've just created a program using VB6 Enterprise Edition. The complied exe file works fine. I've used ADODB command to connect to MS Access to add, query and update. Below is a sample of the code:

Dim FindManualRef As Command
Dim rstManualRef As ADODB.Recordset
Dim conn As ADODB.Connection

Set conn = New ADODB.Connection
Set FindManualRef = New Command
Set rstManualRef = New ADODB.Recordset

With conn
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:Prod.Engrg.SchPlanning Wizard IIPlanning.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
.Open
End With

But when I package the project and setup the program in my PC, I encounter run-time error '53' - file not found, when i click on the command buttons in the main form to go to the sub forms. Similar problem encounter for the setup of exe file on other PCs.

My PC OS is XP and I've upgraded to SP6 but still encounter the same problem. Could you kindly advise whether you've experience similar issue and how to resolve it. Thanks.

On Error Goto File Not Found
im trying to avoid file not found and go to stuff but i keep getting error message file not found



Code:
On Error GoTo stuff
For i = 0 To List3.ListCount - 1

newstring = List3.List(i)
newstring = Trim(List3.List(i))
newstring = Replace(newstring, " ", "-")
newstring = Replace(newstring, ":", "")
newstring = Replace(newstring, "/", "")
newstring = Replace(newstring, "'", "")
newstring = Replace(newstring, "*", "")
newstring = Replace(newstring, "@", "")
newstring = Replace(newstring, "&", "")
newstring = Replace(newstring, "?", "")
DoEvents
Open App.Path & "/files/game-boy1/game-boy-" & newstring & "-cheat-codes.php" For Input As #1
While Not (EOF(1))


DoEvents
Line Input #1, txt
newerstring = newerstring & txt & vbNewLine
Wend
Close #1

newerstring = Replace(newerstring, Text1.Text, "")
newerstring = Replace(newerstring, Text2.Text, "")
newerstring = Replace(Text3.Text, "???", newstring & " cheat codes") & newerstring
newerstring = newerstring & "</body></html>"

Open App.Path & "/files2/game-boy1/game-boy-" & newstring & "cheat-codes.html" For Output As #1
Print #1, newerstring
Close #1
stuff:
newerstring = ""
Next i

Method Or Error Data Not Found?
Private Sub OK_Click()
r = Val(radius.Text)
h = Val(hght.Text)
pi = 22 / 7
v = pi * (r ^ 2) * h
volume.Text = Str$(v)
End Sub

it highlights the .Text part which are numbers and with Val it should recognize them as numerical so that it can use them in the equation but it gives me
compile error:
method or error data not found

how do i fix that? =/

Vlookup Property Not Found Error -
I currently use a Vlookup inside a cell but would like to move away from that and use a user defined function to clean up the interface but I am getting an error I can't figure out.

here is my test function to enter into my main program

Code:
Sub test_function()

Dim junk As Variant
Dim item_num As Variant
Dim level As Integer

item_num = 10019220
level = 2

junk = pull_description(item_num, level)

End Sub



Public Function pull_description(ByVal item_num As Variant, ByVal level As Integer) As Variant

Dim Curr As Range
Dim Custom As Range


Set Custom = Worksheets("PN").Range("A2:B300")

Dim junk As Variant

If WorksheetFunction.IsNA(WorksheetFunction.VLookup(item_num, Custom, 2, False)) Then
The code sucessfully executes until it gets down to the last line I have put in and then I get an error "Unable to get the Vlookup property of the WorksheetFunction class"

Any ideas on what the problem is.

'ToolsReferences - Path Not Found' Error
As it says on the tin - in vb window I see tools/references. When I click on it I get an error. Any idea how to get rid of it?

Thanks

Run Time Error...file Not Found
Private Sub Form_Load()

frmParseText.Show
Dim whatnum As Integer
whatnum = 1
Dim pkata, ptagging
Open "word.txt" For Input As #1
Do While Not EOF(1)
Input #1, pkata, ptagging
kata(whatnum) = pkata
tagging(whatnum) = ptagging
whatnum = whatnum + 1
Loop
Close #1 ' Close file.
Timer1.Enabled = True
End Sub

I have problem tor un the program after quite a while. The error message shows this "run time error '53'....file not found" it shows the problem at the blue line.

can anyone help me thanks

Error 3011... Table Not Found?
Hi everyone....

i have 2 buttons.... one is to create a table during run time.... another one is to add new records into the newly created table.....
But Error 3011 "Microsoft jet engine could not find the object 'abc'. Make sure you spell the name........" kept popping out...
I checked the database and the table is being created correctly so i don't think there's anything wrong with the creating of tables.... Anyway the error starts at the .AddNew area....


Code:
DatCombine.Connect = "Access"
DatCombine.DatabaseName = "C:My DocumentsCentral ComputerDatabase 1.mdb"
DatCombine.RecordSource = txtTableName.Text
DatCombine.Refresh <<------ The error occurs here.....

For a = 0 To UBound(ArrayGetTable)
DatCombine.Recordset.AddNew
DatCombine.Recordset.Fields("New") = ArrayGetTable(a)
DatCombine.Recordset.Update
Next a
Please help.... thanks a lot.....

Run Time Error 53 File Not Found
I am usin Visual Basic 6.0 with Microsoft Access 2000. When the programming is running from Visual Basic, it runs just fine, no problems. But when I try to make an EXE file and run it, it gives me this retarded RUN TIME ERROR 53 FILE NOT FOUND, but does not specify a file...when I run the EXE. Any ideas why this might be happening?

Conflicting Names Were Found ... Error
All of a sudden, I am receiving an error message when I open a project. I had this happen along time ago, but can't remember how I fixed it. The error "Conflicting names were found in 'C:MyComputerVisual Basic ProgramsPGS CapitalInstructions.frm'. The name "Instructions" will be used. Clicking help, it states "The name of a form occurs twice in the source file for a Form, User Control, Property Page, or User Document. The names are different, so the specified name will be used."

Here is everything associated with this project. I can't see where there is a problem.

Project1(PGS.vbp)
Under Forms:
frmAbout(About.frm)
Instructions(Instructions.frm)
Password(Password.frm)
PGS(PGS.frm)

In the folder, these files appear:
About.rfm
About.frx
Instructions.frm
Instructions.frx
Mssccprj.scc
Password.frm
Password.frx
PGS.frm
PGS.frx
PGS.vbp
PGS.vbw
Quickreport.rpt
Wpreport.mdb

HELP! Thanks.

Copyright © 2005-08 www.BigResource.com, All rights reserved