Hi, Due to issues with VB6 on Windows 2008 I had created a C# EXE that wraps calls to VB6 COM DLL. This works fine as long as I don't access the SQL database from the C#. If I have a query from the SQL database in the C#, then in the VB DLL I have an exception when it tries to connect to the database ("Login failed for user...") The system I am testing this on is windows 2008 32Bit and the SQL is SQL Server 2005. Any ideas to the causes/how to solve the issue? thanks.
soporificeffect
Posts
-
Cannot connect to SQL in VB6 COM DLL called from C# -
How to Match case in accessIf you are using the design view - in the "Field" write: UCase(FieldName) and in the Criteria write CAR (or whatever you want it to be in upper case)
-
Report.Sections.Add gets an error, why?Hi, I'm using VB6 with Crystal Reports 8.5 ActiveX Designer Run Time Library I am trying to add a new section to the report at runtime. I'm using the following code: (CRXReport is defined as: CRAXDRT.Report)
Dim CrSection As CRAXDRT.Section Set CrSection = CRXReport.Sections.Add()
I get the "Invalid procedure call or argument" error, I also get it when I use:Set CrSection = CRXReport.Sections.Add(index)
When I just get an existing section it worksSet CrSection = CRXReport.Sections(index)
Any ideas why this isn't working and how to solve this? thanks. -
subscript out of rangeTry moving your ReDim statement bellow the assignment of n like this: n = Application.Round(VBA.DateDiff("d", c1, c2) / 365 * freq, 0) ReDim v(n) As Variant
-
Size problem when adding pic to Crystal report in RuntimeHi, I am using VB6 with Crystal Report viewer. I wrote a function that adds a picture to the report in runtime using OLEObject. here is the code I'm using:
Set CrPic = CRXReport.Sections(NewPicture.Section).AddPictureObject(NewPicture.Path, NewPicture.XLoc, NewPicture.YLoc) CrPic.Width = NewPicture.Width CrPic.Height = NewPicture.Height
the picture appears where I told it to be and in the requested size. However, it seems that when I first load the picture into the OLE, it "takes" the size of the original picture, and doesn't change it after I change the size. So I have a lot of blank space. I'm looking for a way to either make the OLE take less space from the beginning, or force some sort of refresh of the report. Any suggestions? Thanks. -
getting the update just for one record in the tableyou should use WHERE ID=
-
Call Batch file from VBIf you're using VB6 then you can use the Shell statement. If you're using .NET you can something like this :
System.Diagnostics.Process pcBatch = new System.Diagnostics.Process(); pcBatch.StartInfo.FileName = sFileName; pcBatch.Start();
-
Loop Help PleaseI think your problem is that if there is data in the cell but it doesn't match the value you don't go to the next row. try increasing LFindRow good luck
-
F2 Key pressYou could use KeyDown event. in vb6 you can use the const vbKeyF2 (or its value 113 (&H71))
-
Problem with Folder accessI delete all the files before I try to remove the folder. the folder is empty. there are no applications using this folder. I'm not sure what services run in the background, but it is not possible to disable them. All this also does not explain how on the second computer the folder ends up in "Limbo", I can see it in the windows explorer, but I can't access it, it's as if the RmDir hasn't finished running, because the second the app closes the folder is gone
-
Checking date modifiedYou can try using the DateLastModified property of the File object(FileSystemObject).
-
Problem with Folder accessHi, I have a small problem with folder deletion from a VB application. It's a bit long, so bare with me. I have a form that upon its initialization a folder is created using MkDir. When the form unloads, in its Terminate event the folder is being deleted using RmDir. in between, temporary files are written in to the folder, and deleted from it. My problematic scenario is this: 1. the folder is created. 2. files are written. 3. files are deleted. and here is where the problem starts: on one computer (debug computer), the RmDir throws an exception of access denied, because a process is locking the folder, but I ignore this error, and when I load the form again, I ignore the error the MkDir throws, and everything seems to work fine (except for the fact that the folder isn't deleted). on another computer (which also happens to be the QA, and thus really important), again the folder is not deleted (I don't know if there is an error or not - can't debug), but it is also not accessible anymore. Since it is not accessible, when I re-load the form and try to create the folder again, I get an error. The folder is in limbo. when i close the application (and its process dies) the folder is deleted. my two main goals are a) figure out why the computers are behaving differently b) figure out a way to find out what locks the folder, and release the lock. The only workaround we found, was not to create the same folder each time , but that requires a lot of code changes to VB code as well as C code, as well as not prevent accumulation of temporary folders in my system, both of which I would like to avoid. Any help would be amazing. Thanks. :-D P.S. - in case it was not clear - this is VB6 code.