473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Migrating from vbs to vb.net question

I'm having a heck of time finding out how to code a some 'set' commands from
vbs:
[snippet - what .net does]
objFSO = CreateObject("Scripting.FileSystemObject")
objOut = CreateObject("Scripting.FileSystemObject")
objOut2 = CreateObject("Scripting.FileSystemObject")
objTextFile = objFSO.OpenTextFile(strFile, ForReading, True)
objErrFile = objFSO.OpenTextFile(strErr, ForWriting, True)
objRptFile = objFSO.OpenTextFile(strRpt, ForWriting, True)
objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")
objRootLDAP = GetObject("LDAP://RootDSE")
objOU = GetObject(LDAP://..ldap string..)
[snippet - from vbs]
set objFSO = CreateObject("Scripting.FileSystemObject")
set objOut = CreateObject("Scripting.FileSystemObject")
set objOut2 = CreateObject("Scripting.FileSystemObject")
set objTextFile = objFSO.OpenTextFile(strFile, ForReading, True)
set objErrFile = objFSO.OpenTextFile(strErr, ForWriting, True)
set objRptFile = objFSO.OpenTextFile(strRpt, ForWriting, True)
set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")
set objRootLDAP = GetObject("LDAP://RootDSE")
set objOU = GetObject(LDAP://..ldap string..)

Some of the assignments appear to work, RootDSE and DefaultNamingContext
variables have the correct values. .Net will not accept a "set" at the
beginning of the line, simply erases it. When control passes to the last
line of code above, an error "cannot create activex component" is thrown,
and the object has no value. Any ideas on what I've overlooked or left out?
Had no special includes or anything in the original program
thx
Bill

Apr 13 '07 #1
0 1677

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Paco | last post by:
Hi fellow programmers: Is there an option (within vstudio.net) or a tool that would allow me to 'convert' VB6 source code to vb.net? If not, are condemned to re-write the application. I...
1
by: Kiran Kumar | last post by:
Hi All, We have an application developed in Visual Basic for Load distribution and scheduling of automation testing scripts for Regression Testing. We have planned for migrating this tool to...
2
by: lcifers | last post by:
First off, sorry if my cross posting offends anyone. I'm posting this in Access and SQL Server groups - not sure which one is appropriate. I have a relatively simple ASP.NET/VB.NET application...
10
by: JDS | last post by:
Hi all. I don't know if this is possible, and if it is, whether it needs to be done within Apache configuration or PHP configuration, but here goes: I am migrating my web server to another...
3
by: RollForward Wizard | last post by:
Hi, We are migrating a system from DB2 7.2 to DB2 8.2.2 for a SAP installation. We have the migration guide from SAP. SAP recommends using 16KB page sizes instead of 4KB page sizes. What...
6
by: Shai Levi | last post by:
Hi, I'm trying to migrate native c++ class to managed c++ class. The native class header definition looks as: class NativeClass { public: typedef void (CbFunc1)(int n,void* p);
8
by: Fred Mertz | last post by:
So I have a non trivial ASP.NET 1.1 Web Application with custom controls emitting HTML markup and good deal of static HTML in the aspx pages. I'm wanting to make this thing fully XHTML 1.0...
13
by: Matt Fielder | last post by:
First off, if this is better posted in another group that qualifies as a manged group, please let me know. I currently have an application written in VB.Net using MSDE as the database. Current...
34
by: subramanian100in | last post by:
Is there any difference between porting and migrating. Kindly explain
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.