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




Createdirectory In Windows 2003....


Here is an application i create to test createdirectory in windows 2003, because the application using that code dont work anymore.

is there anywhere that says it wont work with windows 2003? or am i doing something wrong?


Code:
Option Explicit

Private Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
Private Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type

Private Sub Command1_Click()
Dim lngReturn As Long
Dim strRepertoire As String
strRepertoire = "D:logicielsapplications
gp est est"

If Dir(strRepertoire, vbDirectory) = "" Then
'In general section

Dim Security As SECURITY_ATTRIBUTES

lngReturn = CreateDirectory(strRepertoire, Security)

'If CreateDirectory returns 0, the function has failed
If lngReturn = 0 Then
GoTo err_fncCreerRepertoire
End If
End If

MsgBox "ca marche"

err_fin:
Exit Sub

err_fncCreerRepertoire:
MsgBox Err.Description
End Sub




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Problem Running VB6 Application In Windows XP && Windows 2003 Server
I have installed a program written in VB6 and Crystal Reports 8.

When I run the program in Windows XP Professional, once a while I encounter "Illegal Operation" for SslstBar.ocx, Ssdw3a32.ocx and Ssdw3b32.ocx.

When I run the program in Windows 2003 server (program and database in the server), frequently my program seems like hang and I can only close my program using "Endtask".

I need to your help to resolve the above problem soonest possible.

Thank you very much.

Have a nice day.

Please Help Me To Implement RunAs In Windows Service On Windows 2003 Server ...
Hello to all Forum Members;

Currently I'm working on a Monitoring Service which is intended to monitor the status of configured Applications and other Windows Services and restart if any of those are found not running. It works smooth with Windows Services; however I'm facing some problems while making the Service to start the third party Applications that have Database backend via ODBC or ADO.

I register my Windows Service as "Interactive with Desktop" under "LocalSystem" account on Windows 2003 Server. If I configure an Application such as Notepad or similar then there is no problem; but if there any application that has Database backend then the problem starts! These applications are not getting started properly. One of such applications is VoIPSwitch which says that it failed to connect to Database as either database drivers are not found or database does not exists! Both reasons are wrong as I can start the same application with the double click on same Executable file; it's just my Windows Service that's not able to start the application.

I received a suggestion to implement the RunAs for starting such applications with User Name and Password passed to it. So, for my quick testing I quickly searched for RunAs code module and found two examples on Planet Source Code, one of which I'm currently implementing in my code, too. You can download it for your reference from following URL:

http://www.orbitfiles.com/download/id1291685973

When I implemented it in my Monitoring Service and checked my Service Log (which I have coded to be written to ServiceLog.log file; this is not Windows Event Log), I got to see the error as returned by RunAs code: Access Denied!

I specified the same User Name and Password that I give while logging to my Windows 2003 Server (on which this Service is running) for RunAs and still I'm getting this error! The interesting thing is ... when I executed the RunAs VB code (the link above points to the same code) on the same Server by double-click it's icon and then with same User Name and Password, then it started the specified application without any problem! I feel there is no problem in the RunAs code; but it's the Windows Service (which is under Local System account) is not getting permission from Windows 2003 Server!

Am I missing something here? What's going wrong? Why Access Denied error is giving by Windows 2003 when Service attempts to start the application? I'm absolutely clueless right now; please give me some suggestion/solution to resolve this error!

Waiting for your valuable reply ...

Regards,

Ruturaaj.

Please Help Me To Implement RunAs In Windows Service On Windows 2003 Server ...
Hello to all Forum Members;

Currently I'm working on a Monitoring Service which is intended to monitor the status of configured Applications and other Windows Services and restart if any of those are found not running. It works smooth with Windows Services; however I'm facing some problems while making the Service to start the third party Applications that have Database backend via ODBC or ADO.

I register my Windows Service as "Interactive with Desktop" under "LocalSystem" account on Windows 2003 Server. If I configure an Application such as Notepad or similar then there is no problem; but if there any application that has Database backend then the problem starts! These applications are not getting started properly. One of such applications is VoIPSwitch which says that it failed to connect to Database as either database drivers are not found or database does not exists! Both reasons are wrong as I can start the same application with the double click on same Executable file; it's just my Windows Service that's not able to start the application.

I received a suggestion to implement the RunAs for starting such applications with User Name and Password passed to it. So, for my quick testing I quickly searched for RunAs code module and found two examples on Planet Source Code, one of which I'm currently implementing in my code, too. You can download it for your reference from following URL:

http://www.orbitfiles.com/download/id1291685973

When I implemented it in my Monitoring Service and checked my Service Log (which I have coded to be written to ServiceLog.log file; this is not Windows Event Log), I got to see the error as returned by RunAs code: Access Denied!

I specified the same User Name and Password that I give while logging to my Windows 2003 Server (on which this Service is running) for RunAs and still I'm getting this error! The interesting thing is ... when I executed the RunAs VB code (the link above points to the same code) on the same Server by double-click it's icon and then with same User Name and Password, then it started the specified application without any problem! I feel there is no problem in the RunAs code; but it's the Windows Service (which is under Local System account) is not getting permission from Windows 2003 Server!

Am I missing something here? What's going wrong? Why Access Denied error is giving by Windows 2003 when Service attempts to start the application? I'm absolutely clueless right now; please give me some suggestion/solution to resolve this error!

Waiting for your valuable reply ...

Regards,

Ruturaaj.

Windows Service On Windows Server 2003
Hi,

I need to run my application with UI as interactive windows
service (with "Allow service to interact with desktop" and "Local
System Account" checked in service's properties)
Works expectedly on Windows 2000, but not on Windows Server 2003 - UI is
invisible.

Need help.

ADO, SQL SVR, Windows 2003 R1 And R2
Has anyone come across the following bug before:-

we have 2 servers, one running Windows 2003 release 1, and the other running Windows 2003 release 2. Using VB6 and ADO to connect to SQL Server 2000.

This VB code only works on Release 1:-

frm.AdodcTemp.Refresh
frm.AdodcTemp.RecordSet.Update

Where as the above code only works on Release 2 when put like this:-

frm.AdodcTemp.RecordSet.Update
frm.AdodcTemp.Refresh

Just doesnt make sense. Anyone come across ADO errors (Probably more like lower level problems) of this type before ? We're using MDAC 2.8 on all.


Need Help With VB In Windows 2003
I have a program that we've moved from a windows 2000 server to a new windows 2003 server. But ever since then, any time I get an error like "active X can't create object" It pops up a message box, instead of just doing the "on error goto Error_handler" code. Does anyone know if 2003 has any sort of setting that might be causing this behavior. Its quite irritating.

VB In Windows 2003
I want to load VB in Windows 2003 server.
Is it possible?

is it give any problem while creating the setup of a VB project?

bye

S.Muhilan

VB && Windows Server 2003
Hi everyone,

Recently I've started running some of my apps on Windows server 2003.
Everything seems fine apart from one slight problem with "File System Object".

If I have a filesystemobject FSO, when ever I try to copy files, It seems to hang on the first time it is called by the user.

anyone encountered this?

Thanks in advance

VB4, Windows 2003 && SQL 2000
I have an old VB4 application that sits on an NT machine and connects to a SQL Server 6.5. Microsoft is de-supporting NT so I want to move the application to Windows Server 2003 and connect to SQL Server 2000. The application works fine on 2000 (connecting to SQL2000) but when I try it on 2003 it will not connect to the database.

The application is written in VB4 using WinCGI - I'm creating an .exe. IIS does not support the WinCGI interface natively so in order to make the application run the IS2WCGI.dll library is used to translate the WinCGI app to something compatible with IIS. This *should* not be the problem but just thought I should include it to be complete, I can run a WinCGI app it's just the database connection that's giving me the problem.

Where I am at right now is just forgetting the whole application and just writing a simple test that will connect to the database.

The error I get is:
"Object required (error #424)"

And yes, we could upgrade from VB4 but that is not an option at this time, we may just run it on 2000 but I'd really like to solve this problem or at least confirm that it just will not run on 2003.

Code that I have tried (all get the same error):

____________________________________
Dim rdoSuperann As rdoConnection
Set rdoSuperann = rdoEnvironments(0).OpenConnection("My_DSN", rdDriverNoPrompt, True, "DSN=My_DSN;UID=username;PWD=password;DATABASE=database")
____________________________________
Dim my_Conn As Object
Set my_Conn = Server.CreateObject("ADODB.Connection")

____________________________________
Dim db As Database
Dim connect As String
connect$ = "ODBC;DSN=My_DSN;UID=username;PWD=password;DATABASE=database;"
Set db = OpenDatabase("", False, False, connect$)
____________________________________

I have an ODBC data source defined (it connects fine).

Now this may just be my inexperience with VB4 but any suggestions would be great If you need anymore info please let me know. Thanks.

VB6 + Windows 2003 Server
Hello.

Everytime i try to install visual studio 98 (to use vb6)
and after the reboot on the forced install of the jvm,
all network related stuff stops working and some services fails to start.

Im currentl using Windows 2003 Server Standard, fully updated and are atm forced to run xp in a VM to be able to access vb6 and make changes to previous apps (that isnt needed to be ported to .net)

any suggestions?

VB6 And Windows Server 2003
I have a scheduling program written in VB6 that was moved to windows server 2003 and does not work. Any suggestions on what I need to do to make it work?

Windows Server 2003
I know this is kind of vague, but, would there be an issue with windows server 2003 and VB 6 programs? I have an app that installs and works on all workstations running 2000 and XP. However, when the app is installed on a server running 2003 the app shows to be running but you can't see it. The install app was created using inno setup.

VB6 && Windows Mobile 2003
is it all application compiled with vb6 can be use in pocket pc that running win mobile 2003?

i developed a simple client file database system using vb6 with access database, so, is it any problem if i wish to install it in my client pocket pc?

Windows 2003 Server
My new host runs Windows 2003 server. My old host was Windows 2000.
I am using ASP/ADO and an Access database.

My site is on a shared server, and recently has been experiencing down time. After looking at my scripts, I realized I neglected to explicitly close my Database connections after the scripts are executed. When I asked them, they said that the issue was indicative of a memory leak. In order to keep the site running, they had to set the "recycle" time of the server to every two hours.

I ran on the old server with a lot of spots that were worse about object clean-up, the old server also saw much more traffic than the new one does and the old server never had this issue. My question is, does anyone know if Windows 2003 server has a problem with memory clean-up? Why does this server seem to be more touchy? I understand it really is my fault, and I didn't really follow good coding standards when writing some of those scripts.

I want to know if it will ever change. I went through my scripts AGAIN, and made sure I was cleaning everything up. I asked them to increase the recycle time to 6 hours, just as a test, and the site was brought to it's knees within a few hours. I am going to go through my scripts again, but I am wondering if I should just find a new host.

I know Access is not recommended for heavy traffic sites, but the only database that every page even comes close to accessing is a small database, and I open and close the connection almost immediately. There is not a lot of data transfer between that database and the website.

If anyone can shed some light on this, it would be greatly appreciated.

Thanks for reading this!

Our VB 6 App Running On Windows 2003 SBS
I work for a software house. Our main product is a 2-tier personell
rostering system written in VB6 connecting to a SQL 2000 database.


Many of our customers are now moving to Windows 2003 server from either
Windows NT Server or Windows 2000 Server.


What several of our customers are telling us (and we actually had one
of the machines shipped back to us to re-produce the problem) is that
after a re-boot, the application will run fine for a few hours, but
will then begin to grind to a halt and the application will hang.


This only seems to happen when they use terminal services to run the
app directly on the box, rather than installing our application on
their own desktop PC and connecting to SQL on the W2003 server.


We also have a VB6 Windows service which runs on the server which does various
backgrounds tasks, which also grinds to a halt.


What we notice with the machine that one of our customers has shipped
back to us (windows 2003 Small business server), is that when this VB6
service is running the memory usage and the number of handles increases
at an alarming rate and never returns to "normal".


The average usage of this VB6 service is about 10-20 MB of memory and
about 150 handles.


What we are seeing is the memory usage hitting 140MB and the handle
count hitting up to 100,000 handles!!!


If I run this VB6 service on my development machine (XP Pro), connected
to the database on the customer machine, then the behaviour appears
normal.


We have therefore ruled out any problems with SQL Server on this
machine.


Incidentally, it is SQL Server 2000 SP3. I also installed SP1 for
Windows 2003 yesterday and made sure that all critical updates had been
applied.


The spec of the machine is an IBM 2.8Ghz Pentium CPU (HT technology),
1.5GB of RAM and 100GB SATA drive.


What we have found, having spoken to our customers who are experiencing this problem is that they are ALL using Windows 2003 Small Business Server, rather than "standard" Windows 2003 Server.

What I have tried today is to build a Windows 2003 Server (not small business server), and the applications run without any problems.


There is obviously something different between Windows 2003 server and the small business edition, where memory allocation and handle allocation is concerned, but I cannot find out what this difference is.

Has anyone else had experience of this problem?


I've searched for pretty much every combination of search words on the
net and cannot find anything?


I hope someone out there can help!!


Regards
Guy

Windows Mobile 2003 And EVB
Hello,

it's possible use eVB for programming Windows Mobile 2003 device ?

Thanks

skimans

POP3 On Windows 2003 Using NTLM....
Anyone have any idea how to either connect to the POP3 Service on Windows 2003 using NTLM, or to disalble NTLM for POP3?

I wrote a program to read POP3 messages, but got thrown for a loop with NTLM when we tried to use Microsofts POP3 Service....

VB5 Apps And Windows Server 2003
Hello everybody. I need to develop VB executables which must run under Windows 98, Me, 2000, XP and Windows Server 2003.

Since I'm not allowed to provide the final users with a setup package, (all the machines are protected) I am obliged to use VB5 rather than VB6. This is because the runtime files needed by VB5 progs (MSVB50VM.DLL and OLEAUT32.DLL) are already present in Windows 98 or later versions. On the contrary, the version of OLEAUT32.DLL needed by VB6 progs is newer than the one you find in Win98, so you would need to replace it.

Now, since some of the computers to which I have to deploy my apps are equipped with Windows Server 2003, I need to know if the library MSVB50VM.DLL is still in the operating system or it has been removed by Microsoft (for example, because it is considered obsolete).

Is there anybody out there using Windows Server 2003 who may want to help me? Just open the Windows/System32 folder and check if you can find the incriminated library.

TIA

Pasquale Esposito
Perugia, Italy

VB6 Application On Windows Server 2003
Hi,

I have a problem with running VB6 application on Windows Server 2003. Project has one or more simple forms, and after calling FORM.SHOW application crashes and throw error OUT OF MEMORY.

Does anybody know where is the problem? With compatibility or something else?

Thanks.

VB6 Windows 2003 Porting Checklist
Hello All,

I have a VB 6 application (EXE, compiled in VB6 SP4). This communicates with a VC++ application, and some thrid party objects (COM server), all running on a Win 2k box.

I am looking to upgrade to Windows 2003. Reading on the forum, I see that in general VB 6 applications run on Windows 2003, but I was wondering if there is a list of things to look out for when porting to Windows 2003?
E.g.: specific Service pack installs, any VB6 runtime / DLLs installs etc

Are ther any links to articles discussing porting of VB6 applications to Windows 2003 that you can point me to?

thanks in advance.

Timers On Windows 2003 Server
Hi All,

I'm looking for a little advice if possible.

I'm writing a small program for tech support purposes, I've been testing as I'm going along and have noticed that my timer event doesn't seem to be running on Windows 2003, it's a simple timer that updates a text field with info from strings.

Any ideas?
Cheers,
Michael.

Disable Screensaver In Windows XP/2003
This code doesn't works...


VB Code:
Private Const SPI_SETSCREENSAVEACTIVE = 17 Private Declare Function SystemParametersInfo Lib "user32" & _  Alias "SystemParametersInfoA" (ByVal uAction As Long,  & _  ByVal uParam As Long,  ByVal lpvParam As Long,  & _  ByVal fuWinIni As Long) As Long   Public Function EnableScreenSaver(ByVal bStatus As Boolean) As Boolean  Dim lActiveFlag As Long  Dim lRetval      As Long   lActiveFlag = IIf(bStatus, 1, 0)  lRetval = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, & _                                 lActiveFlag, 0, 0)    IF lRetval > 0 THEN    EnableScreenSaver = TRUE  ELSE    EnableScreenSaver = FALSE  END IF End Function

POP3 On Windows 2003 Using NTLM....
Anyone have any idea how to either connect to the POP3 Service on Windows 2003 using NTLM, or to disalble NTLM for POP3?

I wrote a program to read POP3 messages, but got thrown for a loop with NTLM when we tried to use Microsofts POP3 Service....

VB6 App Running On Windows Mobile 2003
Hi All,

I have created a simple application in VB6, just a lot of forms, list boxes and text boxes, the most difficult thing it does is output a CSV file, and im wondering will it work ok on windows mobile 2003?

I need to purchase a specific handheld, costing a considerable amount, they cant guarantee that it will work and arent willing to let me test before buying, so can anyone shed any light on the subject.

Thanks

E-mail Using Outlook 2003 On Windows XP SP2
Hello Everyone.

I need some help. I want to e-mail from my application using Outlook. I am currently using Outlook 2003 on a Windows XP Pro w/SP2 platform. But the platform can be from Win 98 up to XP and on either Outlook 97 - Outlook 2003 or Outlook Express.

What I want to do is have the application open the Outlook program. Insert the recipent information, subject, and body text. Then use an API call to do the send message button click to send the message. I want to make the application do the button click so that it avoids the security warning. Then I want the application close the e-mail application.

Any help will be greatly appreciated.

Coding Problem In Windows 2003
hello,
i've written a vbscript which uses the event log to check on the uptime of a computer diring specific hours of the day. My script runs perfectly on the windows xp box i programmed it on, but when i run it from a 2003 box the time based if statements (shown below) do not get entered. any ideas how i can get around this?



If TimeValue(SvrDown(time)) >= TimeValue("6:00:00 AM") _
And TimeValue(SvrDown(time)) <= TimeValue("6:00:00 PM") Then
'Server up during business
If TimeValue(SvrUp(time)) >= TimeValue("6:00:00 AM") _
And TimeValue(SvrUp(time)) <= TimeValue("6:00:00 PM") Then
'Server Back Up the Same Day
If TimeValue(SvrDown(time)) <= TimeValue(SvrUp(Time)) Then
DT = DT + (TimeValue(SvrUp(time)) - TimeValue(SvrDown(time)))
'Server Back Up the Following Day
Else
DT = DT + (TimeValue("6:00:00 PM") - TimeValue(SvrDown(time))) + (TimeValue(SvrUp(Time)) - TimeValue("6:00:00 AM"))
End If
'Server up after Hours
Else
DT = DT + (TimeValue("6:00:00 PM") - TimeValue(SvrDown(time)))
End If
'Server down after hours
Else

Windows 2003 Port Mapping
We have a program with the following code:
Open lpt1: for output as #1
print #1, "07"
close #1

that works fine if the printer is connected to the server, an you are logged onto the server. but when a client machine log in, and the ports are mapped back to the client so the printe is on the client the code does not work with an error 52 ba file name or number.

does anyone have any ideas or soultions on what is going on?

thanks in advance

64bit Windows Server 2003, And Vb6 Dll
Hi all,
Does anyone have any experience with my problem?
I have a VB6 dll which works perfectly on x32 server2003 and XP.
I registry the dll before i use it using regsvr32.
This all works fine on x32.
On x64 the regsvr32.exe reports the dll has been registered successfully. However when i try and use the dll from vbscript i get error message that ActiveX cannot create the object "ddlname.module"

Any ideas what i need to do?
I have tried copying the dll into c:windowssystem32 and into the WOW folder.

Thanks,
mrmovie

Crystal Report Through ASP In Windows 2003
Hi,
 
I am getting the error as "Error 80010105".
I have the ASP page where in I am generating the crystal report with some filter criteria.
The server machine is Windows 2003 and Crystal report version 7.0
The error is thrown in the line Crystalreportobject.Action = 1
 
The same is working in Windows2000 machine.
I do not know whether this problem is relared to the ISS 6.0 or some rights problem.
Can you please help me out to solve this problem.


Thanks and Regards,
Hetal Sheth

TAPI And Windows Server 2003 SP2
I've developed Answering machine program and i've used TAPI 3 in this program
this program works in winXP SP2 and win Server 2003 SP1 completely
but it can't handle incoming call and detect DTMF keys in win Server 2003 SP2
does microsoft put any limitation on windows server 2003 SP2 ?
does this link have any relation with this problem ? if yes how can i solve this problem ?
http://www.microsoft.com/downloads/details.aspx?FamilyId=0097FE14-1D6B-4423-A437-DEA1ED665A07&displaylang=en

thanks

Windows Server 2003, ActiveX, ASP
migrating an asp/vb6 active x site from win2000 to win2003. setting up activex on 2003 has proven to be fairly frustrating. i can't get the asp page to instantiate the component, so i'm assuming that the permisssions aren't set correctly. 2 of us have been scouring the web since yesterday and haven't been successful in getting this going. does anyone have any decent resources for getting this set up?

Bill Bolte
http://www.billbolte.com | http://www.circle37.com
http://www.oldbarnsite.com | http://www.oldutguy.com

Windows Server 2003 Component Services
I have an active x dll that I have written in VB6.0. For the last year it has been running great as a component service in com + (MTS) on a windows 2000 server box. I am now wanting to utilize some of the new features of Windows Server 2003 with this component. I have installed it on a windows server 2003 box and am receiving an Error 48: Error in Loading Dll. If I use the dll from my calling program without registering under component services on the W2k3 Server machine it works fine. Once I register it in component services as a Server Application I receive the Error in loading Dll.

Any help would be greatly appreciated!

C

VB6 Automation Failing On Windows 2003 Server W/SP1...
I hope that I'm in the correct forum for this

I had service pack 1 get installed on our Windows 2003 Server (Standard Ed) that we use as a Terminal Server.

Now my ADOX automation for creating a table in MS Access does not work. It works if you are not on the Terminal Server.

Has anyone run into this problem/have some idea for a workaround? I'd really appreciate it.

Here is my creation code:


Code:
'Create the hours table
Private Sub CreateTable()
Dim objCat As ADOX.Catalog, objMyTable As ADOX.Table, objColumn As ADOX.Column
Dim oKey As ADOX.Key, TableName As String, TheDate As Date

Set rstHours = Nothing
Set cmdHours = Nothing

Set objCat = Nothing
Set objMyTable = Nothing
Set objColumn = Nothing
Set oKey = Nothing

'ADOX creation
Set objCat = New ADOX.Catalog

objCat.ActiveConnection = conHoursDB

If Weekday(Date) = vbSunday Then
TheDate = Date
Else
Select Case Weekday(Date)
Case vbMonday
TheDate = Date + 6
Case vbTuesday
TheDate = Date + 5
Case vbWednesday
TheDate = Date + 4
Case vbThursday
TheDate = Date + 3
Case vbFriday
TheDate = Date + 2
Case vbSaturday
TheDate = Date + 1
End Select
End If

Do While Not Month(Date) = Month(TheDate)
TheDate = TheDate - 1
Loop

'Tablenames in format hrs_##/##/####
TableName = "hrs_" & Format(TheDate, "Short Date")

'Setting table properties
Set objMyTable = New ADOX.Table

With objMyTable
.Name = TableName
End With

'Append table name into database
objCat.Tables.Append objMyTable

'Sets all the column properties in table
Set objColumn = New ADOX.Column
With objColumn
'jobdate
.Name = "jobdate"
.Type = adDate
End With

objCat.Tables(TableName).Columns.Append objColumn

Set objColumn = Nothing

Set objColumn = New ADOX.Column
With objColumn
'job number
.Name = "jobno"
.Type = adVarWChar
.DefinedSize = 20
End With

objCat.Tables(TableName).Columns.Append objColumn

Set objColumn = Nothing

Set objColumn = New ADOX.Column
With objColumn
'job code (shown as task code)
.Name = "jobcode"
.Type = adVarWChar
.DefinedSize = 20
End With

objCat.Tables(TableName).Columns.Append objColumn

Set objColumn = Nothing

Set objColumn = New ADOX.Column
With objColumn
'hours worked
.Name = "hours"
.Type = adSingle
.NumericScale = 2
End With

objCat.Tables(TableName).Columns.Append objColumn

Set objColumn = Nothing

Set objColumn = New ADOX.Column
With objColumn
'time started
.Name = "timestarted"
.Type = adDate
End With

objCat.Tables(TableName).Columns.Append objColumn

Set objColumn = Nothing

Set objColumn = New ADOX.Column
With objColumn
'description.. a memo field. can store up to 65k characters
.Name = "description"
.Type = adLongVarWChar
End With

objCat.Tables(TableName).Columns.Append objColumn

Set objColumn = Nothing

Set objColumn = New ADOX.Column
With objColumn
'hours
.Name = "thours"
.Type = adInteger
End With

objCat.Tables(TableName).Columns.Append objColumn

Set objColumn = Nothing

Set objColumn = New ADOX.Column
With objColumn
'minutes
.Name = "tmins"
.Type = adInteger
End With

objCat.Tables(TableName).Columns.Append objColumn

Set objColumn = Nothing

Set objColumn = New ADOX.Column
With objColumn
'index
.Name = "index"
.Type = adInteger
Set .ParentCatalog = objCat
.Properties("AutoIncrement") = True
End With

objCat.Tables(TableName).Columns.Append objColumn

Set oKey = New ADOX.Key
With oKey
'set index as primary key
.Name = "UniqueKey"
.Type = adKeyPrimary
.RelatedTable = "tablename"
.Columns.Append "index"
End With

objCat.Tables(TableName).Keys.Append oKey

objCat.Tables.Refresh

conHoursDB.Close
'Set the database connection
conHoursDB.Mode = adModeShareDenyNone
conHoursDB.CursorLocation = adUseClient
conHoursDB.Provider = "Microsoft.Jet.OLEDB.4.0"
conHoursDB.ConnectionString = _
"Persist Security Info=False;" & _
"Data Source=" & App.Path & "hours.mdb"
conHoursDB.Open

Set objMyTable = Nothing
Set objColumn = Nothing
Set oKey = Nothing
Set objCat = Nothing

'Processor/Database catchup time
DoEvents


'Load the table
LoadMain (TableName)

End Sub

Upgrade From Windows 2003 Sp1 To Sp2, What Is The Impact On VB6 Application
Can someone tell me the impact on my VB6 application if i upgrade the server from Windows 2003 sp1 to sp2?

Thanks for your help !!

Compatibility With Windows 2003 Server Issue!
dear all,

i am experiencing a very weird behaviour i cannot get an understanding and worse, a solution for it. basically, a compiled file that works perfectly in windows versions 98, Me, 2000, XP does not so in windows 2003, but the strange thing is: if i compile the very same code under windows 2003, it perfectly works on 2003, though this time it crashes under the previous windows versions. i repeat: no code change.

i've tracked the error down by compiling under 2003 and exporting the file to 2000, until it didn't crash anymore. what is causing this crash is the clearing of a combo box:

Code:
Main.cmb_newsletters_list.Clear

does anyone know what you have to do to make this work on all versions of windows? is there a DLL that needs to be depolyed?

really lost on this one... hopefully some of you gurus out there can give me an hint...

thank you in advance,

wc.

[VB 2003] Windows Forms Detect WEB Access
I have a windows forms application and need to detect if the user PC has access to the Web before attemting a web download.

How can I do this?

Deleting A File From VB 6.0 In Windows Server 2003
I'm trying to delete a file in Windows Server 2003 using an EXE in Vb 6.0

In another operative system, when I have the file opened in word (so the file is locked), for example, VB returns an error. The error Number is 70 (permission denied). I rely on this error number to do some other things in the program.

But when I run the program in Windows Server 2003, it gives me no error (ErrorNumber = 0 ).

Does anybody know ahy is this happening?

THanks

Visual Basic 6.0 And 64-bit Windows 2003 Server
Hi:

1) can I install visual studio 6.0 on a 64-bit windows 2003 server?
2) can I run a 32-bit visual basic 6.0 code on the 64-bit windows 2003 server? My code calls some library API, like: kernel32, advapi32.dll...

Thanks,

Installation Problems On Windows Server 2003
Hello,

    I wrote a vb6 application that uses the crystal 9 components to print a report.  This appliction is kind of a scheduler that will print the report at a certain time every morning.  I created a setup using the VB P&D and I tried to install it on a "Windows 2003 Server".  The install go all the way to where you see "Setup is updating your System" and it hangs up.  I've let it sit there for about 30 minutes but is never goes away.  When I look at task manager it says it is not responding.  I tried this on a couple of "Windows 2003 Servers" and it did the same on both.  Any help would be greatly appreciated.

Thanks in advance,

UncleT

VB Windows Application Connect To SharePoint 2003
how can I connect to Sharepoint 2003 portal server in a Windows Application written in VB6?

Windows Vista && Visual Basic 6.0 ,.net 2003?
where now Visual Basic 6.0 & visual basic .net 2003?

both doesn't work on vista & all my application i done on xp ,doesn't work on vista ,coz vista works on 64 BIT so what can i do to run my application on vista there is solution for that problem ???

or we had to use visual studio 2005 ….
I need advise plz

Thanks

Running A VB6 Application On A PDA With Windows Mobile 2003 Second Edition
HI,

I was wondering can anyone tell me if its possible to transfer a VB6 application to a PDA which is running windows mobile 2003 SE. and run it. I understand its not as simple as that but even if you could oint me in the right direction if any.

Thanks

MAPI Error On Windows Server For Small Business 2003
I'm running Windows Server for Small Business 2003 (SP2) and a small app that will send a MAPI email.

When the MAPISession.SignOn method is called it immediately produces an error 32002 (unspecified failure has occurred). We're using Outlook Express as the email client (yes, it's set as the Windows default email program, and yes, it works perfectly when accessed directly).
It works fine on other machines, but it seems that the error is because of Windows 2003 Server for Small Business Server.

Code as simple as:
Me.MAPISession1.SignOn

Interface Of Active Exe Project Not Visible On Windows 2003 Server
Hi,

I've got the following issue. I've got a VB active exe project, which I instantiate from SQL Server. The project contains some code and a simple interface (form). Normally in nt4, w2k and such, the executable only shows up in the taskmanager, but has no user interface. I solved this, by using DCOMCNFG and setting the identity to the 'interactive user' instead of 'launching user'.
This worked like a charm. I also must note, that it can work as the launching user, only when SQL Server is started from command line, instead of as a service.
But now I'm using windows 2003 server, and I have something similar, working when SQL Server is started command line, but not as a service. So I change the identity to 'interactive user' and it still doesnt work?!?

Does anyone have similar experiences and found a solution?

Thanks in advance.

Best regards,

Eric

Navigation Buttons Do Not Pass To Form In Windows Mobile 2003
Hi,

We have a quite complicated Evb app (30 forms and three modules!) controlling a laboratory instrument. This has worked very well using Mips based devices running CE 3.0. These are now very scarce so I have moved it all to one running an X Scale processor and Windows Mobile 2003 SE. Everything works fine with minor tweaks apart from the fact that the the keyboard events that I used to navigate controls on many forms from the machines Joystick, do not work any more (apart from on "standard multi button Message Boxes" and the enter Key which always passes to the control with the focus).

As a test, I created a simple form with four command buttons and no code at all for joystick navigation.

On a CE 3.0 device, the the Cursor Wheel and Up/Down buttons moves the focus in the tab order and rolls over at the top or bottom straight out of the box. However, on a device with Windows Mobile 2003 SE, you can hear the clicks from the knobs but the focus does not tab through the buttons at all. Only the Enter/Action Key works on the button that has the focus.

I can directly control the focus directly from the code that handles the joystick input but keeping track of which form is visible and if the user touches the screen and changes it is a nightmare compared with the original which was simple and foolproof!

Does anyone know if this is a "Feature" of the later OS with Evb and if there is a simple workaround?

Thanks for any help.

Component Not Working In Windows 2003 Server But Working In Windows 2000 Server
hi,

I have a VB upload component which woeks weel with the Windows 2000 server but when i have the same component installed in the Windows 2003 server it is not working. It is displaying the following error. error '800706be' . Searching the microsoft support site i cannot get any relevant information. If anyone has solution for this.

Bye

Sridharan

Reading/Import Data From Excel 2003 File And Write/export To Access 2003 Database
I'm developing Database System using MS Access 2003
As the old data are all in Excel format, I'd like to add a function into the system so that operator import old data from Excel file into the Access 2003. But i do not know how to write data into Access Database using dataset object

I have write the follwing code to read data from Excel file:

Code: Public Sub import_from_excel()
Dim conn_excel As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data Source=c:
eport
eport_10102006.xls;Extended Properties=Excel 8.0")

sqlcommand = String.Empty
sqlcommand = "Select * from ['Multiple PN$']"
Dim excel_adaptor As New OleDbDataAdapter(sqlcommand, conn_excel)
Dim excel_DS As New DataSet
excel_adaptor.Fill(excel_DS)

'For testing
Dim excel_DT As New DataTable
Dim f_ed As New excel_data
f_ed.Show()
excel_adaptor.Fill(excel_DT)
f_ed.dg_excel.DataSource = excel_DT
'conn_excel.Open()
conn_excel.Close()
       
End Sub

Cannot Log Into Exchange 2003 In Program, But Outlook 2003 Works Ok For That Account
I have an error when trying to log into outlook accounts in my vb6 program. I do not have a problem logging into these same accounts using outlook 2003. I have googled and found most of the solutions refer to wsock32.dll is missing. I have a wsock32.dll file. And that also would not explain why I can log in to the accounts on our exchange server using outlook 2003.

Anyways, here is my code: (it is still rough, but I just want to get past this and I will clean it up later for all you experts...lol) I may have pinpointed it to the IPM.Appointment error. I have checked my books and that looks correct though.
Code:
Dim objSession As MAPI.Session
Dim objFolder As MAPI.Folder
Dim objMsgs As MAPI.Messages
Dim objMsg As MAPI.AppointmentItem
Dim objField As MAPI.Fields

Dim mar102007 As String
Dim mar112007 As String
Dim mar122007 As String
Dim nov32007 As String
Dim nov42007 As String
Dim nov52007 As String

Dim i As Long
Dim numChecked As Long
Dim temp As String
Dim Count As Long
Dim Subject As String
Dim location As String

Dim startDate As Date
Dim endDate As Date

Dim notes As String

mar102007 = "03/10/2007"
mar112007 = "03/11/2007"
mar122007 = "03/12/2007"
nov32007 = "11/03/2007"
nov42007 = "11/04/2007"
nov52007 = "11/05/2007"

On Error GoTo ErrorHandler

If Check4.Value <> 1 And Check5.Value <> 1 And Check6.Value <> 1 And Check7.Value <> 1 Then
MsgBox "You must check one of the check boxes of a year to the left to run this program"
Exit Sub

End If

Set objSession = New MAPI.Session

objSession.Logon 'must logon before you can use objSession
Set objFolder = objSession.GetDefaultFolder(CdoDefaultFolderCalend ar)
Set objMsgs = objFolder.Messages

If Check4.Value = 1 Then
Count = Count + 1
MsgBox "here"
'it appears that this is need before you make the event to add to outlook
objMsg.Type = "IPM.Appointment" 'this is erroring
objMsg.ConversationIndex = objSession.CreateConversationIndex
Set objMsg = objMsgs.Add

'mar 10, 2007 10 pm to mar 11, 2007 6 am

startDate = DateAdd("h", 22, mar102007)
endDate = DateAdd("h", 6, mar112007)

objMsg.Subject = "Regular event on March 10, 2007 from 10 pm to March 11, 2007 at 6 am"
objMsg.Text = "Here is some text"
objMsg.StartTime = startDate
objMsg.EndTime = endDate
objMsg.location = "This is the location field"
objMsg.ReminderSet = True
'set reminder 15 minutes before startDate
objMsg.ReminderMinutesBeforeStart = 15

Set objFields = objMsg.Fields
objMsg.Update True, True

DoEvents
End If

If Check5.Value = 1 Then
Count = Count + 1
End If

If Check6.Value = 1 Then
Count = Count + 1
End If

If Check7.Value = 1 Then
Count = Count + 1
End If

Cleanup:
MsgBox "enter exitsub"
Set objFields = Nothing
Set objMsg = Nothing
Set objMsgs = Nothing
Set objFolder = Nothing
If Not objSession Is Nothing Then
objSession.Logoff
Set objSession = Nothing
End If
MsgBox "exit exit sub"
GoTo AtEnd

ErrorHandler:
MsgBox "Error Handler"
MsgBox "Error Occurred: " & Err.Description & " [" & Err.Number & "]", vbOKOnly, "DSTMaker - Error"
GoTo Cleanup

AtEnd:
MsgBox "Done"
End Sub
Thanks for the help in advance

Using Faxcomexlib To Create An XP Fax Client Using Windows 2003 Server As Fax Server
1) Can anyone help me clarify the syntax for computer name when the FaxServer and remoteFaxClient are deployed within a domain?

2) If item 1) above is not the problem then does anyone have suggestions on how to properly setup the Fax software (remote Fax Client and the Fax Server)?

The following code works fine for creating a local FAX Client on XP and Windows 2003 Server. However, I want to use the XP node as the Fax Client and the 2003 Server node as the FaxServer.

Whenever I try to use the XP node as the remote Fax Client ot the Windows 2003 Server FaxServer, I get the following error code:

Error -2147024894 (80070002)

This error occurs on the line where the faxjob is submitted. I get the same error on both fax sumissions (JOBID and sumbission without retrieving the JobID):
    'submit and get JovID
    JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

    ' submit without retrieving the JobID
    'objFaxDocument.Submit (objFaxServer.ServerName)

I am wondering if I am using the correct name for the FaxServer. The computer name is "medserver" but the full name (path and computername) is "medserver.domain1.local". I tried using "\medserver", "//medserver", "\mdeserver.domain1", "\medserver.domeain1.local" and I still am not able to connect to the server and send the test fax. Using a blank name for the FaxServer "" or using the local computer name while running the Fax Client VB routine local to the Server works just fine. I get through the connection call but I get the 80070002 error when I submit the fax from a remote Fax Client to the FaxServer.

============================================

Private Sub cmd_SendFaxComEx_Click()
    Dim objFaxDocument As New FAXCOMEXLib.FaxDocument
    Dim objFaxServer As New FAXCOMEXLib.FaxServer
    Dim objSender As FaxSender
    Dim JobID As Variant
    
    strFaxNumber = Me.txt_toFaxNumber.Text 'Any valid faxphone#
    'strFileName ="C:Program DATA FilesVB TestsFax ClientHello World.doc"
    strFileName = Me.txt_attachment.Text 'Any valid text/fax file
    strFaxMachine = Me.txt_FaxServerName.Text 'FaxMachine Name = "\FaxServer"
    
    'Error handling
    On Error GoTo Error_Handler
    
    'Connect to the fax server
    objFaxServer.Connect strFaxMachine '"" for default
    
    'Set the fax body
    objFaxDocument.Body = strFileName '"c: empmsg.txt"
    
    'Name the document
    objFaxDocument.DocumentName = "TMR Test Fax"
    
    'Set the fax priority
    'objFaxDocument.Priority = fptHIGH
    
    'Add the recipient with the fax number 12225550100
    'objFaxDocument.Recipients.Add "12225550100", "Bud"
    objFaxDocument.Recipients.Add strFaxNumber, Me.txt_RecipientName
    
    'Choose to attach the fax to the fax receipt; set to false for no attachment
    objFaxDocument.AttachFaxToReceipt = True
    
    'Set the cover page type and the path to the cover page
    'objFaxDocument.CoverPageType = fcptSERVER
    'set objFaxDocument.Coverpage = fcptNONE for no coverpage
    objFaxDocument.CoverPage = "generic"
    
    'Provide the cover page note
    objFaxDocument.Note = "Here is the info you requested"
    
    'Provide the address for the fax receipt
    objFaxDocument.ReceiptAddress = "someone@example.com"
    
    'Set the receipt type to email
    'objFaxDocument.ReceiptType = frtMAIL
    
    'Specify that the fax is to be sent at a particular time
    'objFaxDocument.ScheduleType = fstSPECIFIC_TIME
    'CDate converts the time to the Date data type
    'objFaxDocument.ScheduleTime = CDate("4:35:47 PM")
    
    objFaxDocument.Subject = "Today's fax"
    
    'Set the sender properties. For the EMR this will be the Dr. Office Info.
    objFaxDocument.Sender.Title = "Dr"
    objFaxDocument.Sender.Name = "TMR"
    objFaxDocument.Sender.City = "Phoenix"
    objFaxDocument.Sender.State = "AZ"
    objFaxDocument.Sender.Company = "TMR"
    objFaxDocument.Sender.Country = "USA"
    objFaxDocument.Sender.Email = "Dr@TMR.com"
    objFaxDocument.Sender.FaxNumber = strFaxNumber
    objFaxDocument.Sender.HomePhone = "1-602-555-5555"
    objFaxDocument.Sender.OfficeLocation = "Downtown"
    objFaxDocument.Sender.OfficePhone = "1-602-555-5553"
    objFaxDocument.Sender.StreetAddress = "123 Main Street"
    objFaxDocument.Sender.Tsid = "Office fax machine"
    objFaxDocument.Sender.ZipCode = "12345"
    objFaxDocument.Sender.BillingCode = "23A54"
    objFaxDocument.Sender.Department = "TMR EMR"
    
    'Save sender information as default
    objFaxDocument.Sender.SaveDefaultSender
    
    'Submit the document to the connected fax server and get back the job ID.
    JobID = objFaxDocument.ConnectedSubmit(objFaxServer)
    
    'Use the following line to submit the fax document w/o getting a job ID.
    'objFaxDocument.Submit (objFaxServer.ServerName)
    
    MsgBox "The Job ID is :" & JobID(0)
    'Exit Sub
    objFaxServer.Disconnect
    
Error_Handler:
        'Implement error handling at the end of your subroutine. This implementation is for demonstration purposes
        'MsgBox "Error number: " & Hex(Err.Number) & ", " & Err.Description
        objFaxServer.Disconnect

End Sub

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