|
-
Oct 25th, 2013, 03:46 PM
#1
Thread Starter
Member
Program opens DOS/command window - but it should not
.Net Framework 4.0.30319 SP1Rel
vb.net 2010 10.0.40219.1 SP1Rel
I have searched on the web for this, but all I can find is how
to use a command window from VB.net, nothing on how to not
get the window. I need to not have the window come up.
This problem is both when running debug in the IDE and after installing
with the .MSI.
When one of the command windows comes up it has
"file:///C:/ProjsVB.net/ImportCSV/ImportCSV/bin/Debug/ImportCSV.EXE"
as the title on the window. This is the .exe of the program I am
running. Nothing can be typed into the window.
One of the places it opens a command window is on the cn.Open()
statement below.
Code:
Dim cmd As New SqlCommand
Dim cn As New SqlConnection(gConnectionString)
Dim dr As SqlDataReader
Try
cmd.Connection = cn
cmd.CommandText = "dbo.spSelectCurrent"
cmd.CommandType = CommandType.StoredProcedure
cn.Open()
dr = cmd.ExecuteReader
It also happens on this sleep statement, with a the same title on the
window:
Code:
AboutdlgNew.Show()
Application.DoEvents()
Thread.Sleep(3000)
AboutdlgNew.Close()
AboutdlgNew.OKButton.Visible = True
By the way, I started this program as a new project in a new solution
and added 3 forms from an existing project: Copied files into the project
folder, Show All Files, right-click and Include. Then I had to define
Public ProgressfrmNew as New Progressfrm in order to use a form. I
doubt this is related to the problem I am having. The problem occurs
in a module, not a form.
Thanks in advance.
-
Oct 25th, 2013, 03:56 PM
#2
Re: Program opens DOS/command window - but it should not
what is your connection string "gConnectionString" ?
More important than the will to succeed, is the will to prepare for success.
Please rate the posts, your comments are the fuel to keep helping people
-
Oct 25th, 2013, 04:00 PM
#3
Thread Starter
Member
Re: Program opens DOS/command window - but it should not
?gARSConnectionString
"Integrated Security=SSPI;Persist Security Info=False;Data Source=DEFDSDB56;Initial Catalog=DEFDB_DEV;Connection Timeout=1200"
-
Oct 25th, 2013, 04:03 PM
#4
Re: Program opens DOS/command window - but it should not
is dbo.spSelectCurrent a stored procedure?
More important than the will to succeed, is the will to prepare for success.
Please rate the posts, your comments are the fuel to keep helping people
-
Oct 25th, 2013, 04:12 PM
#5
Thread Starter
Member
Re: Program opens DOS/command window - but it should not
yes
Select *,
Is_Member('DEFRUDARole') | Is_Member('DEFRUDRole') | Is_Member('DEFRURole') | Is_Member('DEFRRole') as Security_AuditsReadFlag,
Is_Member('DEFRUDARole') | Is_Member('DEFRUDRole') | Is_Member('DEFRURole') as Security_AuditsUpdateFlag,
Is_Member('DEFRUDARole') | Is_Member('DEFRUDRole') as Security_AuditsDeleteFlag,
Is_Member('DEFRUDARole') as Security_DataAdminFlag,
Is_Member('ARSAdminsRole') as Security_ARSAdminFlag,
Is_Member('ARSOnlineFormsURole') as Security_ARSOnlineFormsUpdateFlag
From Users
Where User_NTDomain + '\' + User_Login = sUser_sName()
I am in SQL Server 2008 R2.
-
Oct 25th, 2013, 04:32 PM
#6
Re: Program opens DOS/command window - but it should not
Does this happen with just this project or is it happening for all your projects. Sorry about the short questions and no answers. It is an odd problem and it should not be doing that according to what you have posted so far.
More important than the will to succeed, is the will to prepare for success.
Please rate the posts, your comments are the fuel to keep helping people
-
Oct 25th, 2013, 04:35 PM
#7
Thread Starter
Member
Re: Program opens DOS/command window - but it should not
I ran one other project and it did not do this. I have worked with a number of VB.net projects and this is first time I have seen this happen.
-
Oct 25th, 2013, 05:03 PM
#8
Thread Starter
Member
Re: Program opens DOS/command window - but it should not
References in my project shows it getting Interop.ADOMD.dll from
C:\ProjsVB.net\ImportCSV\ImportCSV\obj\x86\Debug
Is this normal?
That is the only copy of it on my computer.
-
Oct 25th, 2013, 06:51 PM
#9
Thread Starter
Member
Re: Program opens DOS/command window - but it should not
Finally, I created a new project in a new solution, copied form and module
files into its folder, Show All Files, Included files.
The new project did not get the error. Done!!!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|