Error 1326 When Using Wnetaddconnection2 In VBAug 30, 2010
I am trying to connect to a network resource using WNETaddconnection2. The function keeps returning error 1326 which is LOGON FAILURE, when I try to connect to \COMPUTERSHARE
I can run NET USE \COMPUTERSHARE /USER:myuname from the command line and it succeeds. The default user name and password combination (myuname, mypass) is a valid user on the network resource.
Following is all of the declarations and code that I used. In the procedure, CONNECT_SH(), the variable DBPATH a string and is set to "\COMPUTERSHARE" . The user name is pulled from windows using the GETUSERNAME API and I can see that is set to myuname when I am debugging. [code]...