473,804 Members | 3,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem connecting to SQL Server

bob
Can anyone help me connect to SQL Server???

I am new to all this... it is been a titanic struggle consuming hours &

days & ....

I am trying to create an SQL database programatically . But my code
stalls before it gets started, and can't establish a connection to SQL
Server.
Here is my code:

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

Sub MakeDatabase()
Dim cn As New SqlConnection, cmd As New SqlCommand
Dim connect$, sql$

connect$ = "Data Source=(local); Integrated Security=SSPI;
Initial Catalog=;"
cn.ConnectionSt ring = Connect$

Try
cn.Open()
Catch ae As SqlException
MsgBox(ae.Messa ge.ToString, MsgBoxStyle.Cri tical, "SQL
Connection")
Exit Sub
End Try

sql$ = "CREATE DATABASE Cf"

cmd.Connection = cn
cmd.CommandText = sql$
cmd.ExecuteNonQ uery()

cn.Close()
End Sub

This thing stalls and can't connect, giving me an error #5. The error
message suggest that my installed SQL might not allow "remote access".
But I checked and it does. I am using VB 2005 Express and SQL 2005
Express.

Jun 13 '06
14 2256
Bob,

It is in my idea not consistent (the last format we don't talk about that is
only possible with option strict of) and therefore something extra to remind
or to check for if you are not used to it.

Dim Str$ is the exception.

Dim str as String
Dim whatever as MyClass
Dim .. as etc etc.

Therefore in my idea
Dim str as String
tells directer to people (what program language they are used) what you
mean.

However feel free to do it your way, it is only my opinion.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
Cor,

I'm glad you brought that up -- I am just in love with those "old
literals". I guess you mean by that that

Dim sql as String

is preferred to

Dim sql$

I think the last form is so much better. Especially when you see people
doing this:

Dim strSql

See what I mean?

(A lot of people must like the "sql$" approach, because I notice that
MS (after threatening to drop this capability) kept it in VB.NET all
the way through VB.NET 2005.
Cor Ligthert [MVP] wrote:
Bob,

When I had sent my both messages and had read the answers from Peter and
Kerry I saw as well the answer to your problem.

For that there was no need for me to sent another message. Your code is
however in a very personal style: good readable probably by VB diehards,
but
not as we see code today. That was what I did mean with my text about the
mystring$. To say it in other words the old literals are not so common
anymore.

In my opinion( but not mine alone) is one of the first commands to create
a
program using a program language as VBNet, is to make it maintainable by
others.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
> Cor, I'm not sure I understand you about still using "sql$". Anyway, I
> got the problem fixed, and thanks for the help.
>
> Bob
>
>
> Cor Ligthert [MVP] wrote:
>> Bob,
>>
>> Have a look at this sample on our website.
>>
>> http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8
>>
>> I think there is more in than you need, but the information you can
>> use.
>>
>> You are the first one who uses still sql$ by the way in these
>> newsgroups
>> and
>> I have seen much.
>>
>> There is nothing wrong with that, however as written tomorrow by
>> GhostAD,
>> you don't write a program for the computers, write it to let others
>> know
>> what you are doing.
>>
>> I hope this helps,
>>
>> Cor
>>
>> <bo*@datasync.c om> schreef in bericht
>> news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
>> > Can anyone help me connect to SQL Server???
>> >
>> > I am new to all this... it is been a titanic struggle consuming
>> > hours &
>> >
>> > days & ....
>> >
>> > I am trying to create an SQL database programatically . But my code
>> > stalls before it gets started, and can't establish a connection to
>> > SQL
>> > Server.
>> > Here is my code:
>> >
>> > =============== =============== =============== ===========
>> >
>> > Sub MakeDatabase()
>> > Dim cn As New SqlConnection, cmd As New SqlCommand
>> > Dim connect$, sql$
>> >
>> > connect$ = "Data Source=(local); Integrated Security=SSPI;
>> > Initial Catalog=;"
>> > cn.ConnectionSt ring = Connect$
>> >
>> > Try
>> > cn.Open()
>> > Catch ae As SqlException
>> > MsgBox(ae.Messa ge.ToString, MsgBoxStyle.Cri tical, "SQL
>> > Connection")
>> > Exit Sub
>> > End Try
>> >
>> > sql$ = "CREATE DATABASE Cf"
>> >
>> > cmd.Connection = cn
>> > cmd.CommandText = sql$
>> > cmd.ExecuteNonQ uery()
>> >
>> > cn.Close()
>> > End Sub
>> >
>> > This thing stalls and can't connect, giving me an error #5. The
>> > error
>> > message suggest that my installed SQL might not allow "remote
>> > access".
>> > But I checked and it does. I am using VB 2005 Express and SQL 2005
>> > Express.
>> >
>

Jun 14 '06 #11
CT
I agree with Cor; the use of type declaration characters is strongly
discouraged. One reason is that there isn't a type declaration character for
all data types, and it makes it difficult for other developers that aren't
used to read code you have written using type declaration characters.
Obviously it is a matter of preference, but personally I find code with type
declaration characters hideous and downright difficult to read, but hey
that's just my opinion. :-)

Another issue you touch upon Cor, is that of using Hungarian Notation (VB
prefixes such as str, int etc.), which is also discouraged. FxCop would help
here. :-)

Just my $0.02

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:uL******** ******@TK2MSFTN GP05.phx.gbl...
Bob,

It is in my idea not consistent (the last format we don't talk about that
is only possible with option strict of) and therefore something extra to
remind or to check for if you are not used to it.

Dim Str$ is the exception.

Dim str as String
Dim whatever as MyClass
Dim .. as etc etc.

Therefore in my idea
Dim str as String
tells directer to people (what program language they are used) what you
mean.

However feel free to do it your way, it is only my opinion.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
Cor,

I'm glad you brought that up -- I am just in love with those "old
literals". I guess you mean by that that

Dim sql as String

is preferred to

Dim sql$

I think the last form is so much better. Especially when you see people
doing this:

Dim strSql

See what I mean?

(A lot of people must like the "sql$" approach, because I notice that
MS (after threatening to drop this capability) kept it in VB.NET all
the way through VB.NET 2005.
Cor Ligthert [MVP] wrote:
Bob,

When I had sent my both messages and had read the answers from Peter and
Kerry I saw as well the answer to your problem.

For that there was no need for me to sent another message. Your code is
however in a very personal style: good readable probably by VB diehards,
but
not as we see code today. That was what I did mean with my text about
the
mystring$. To say it in other words the old literals are not so common
anymore.

In my opinion( but not mine alone) is one of the first commands to
create a
program using a program language as VBNet, is to make it maintainable by
others.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
> Cor, I'm not sure I understand you about still using "sql$". Anyway, I
> got the problem fixed, and thanks for the help.
>
> Bob
>
>
> Cor Ligthert [MVP] wrote:
>> Bob,
>>
>> Have a look at this sample on our website.
>>
>> http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8
>>
>> I think there is more in than you need, but the information you can
>> use.
>>
>> You are the first one who uses still sql$ by the way in these
>> newsgroups
>> and
>> I have seen much.
>>
>> There is nothing wrong with that, however as written tomorrow by
>> GhostAD,
>> you don't write a program for the computers, write it to let others
>> know
>> what you are doing.
>>
>> I hope this helps,
>>
>> Cor
>>
>> <bo*@datasync.c om> schreef in bericht
>> news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
>> > Can anyone help me connect to SQL Server???
>> >
>> > I am new to all this... it is been a titanic struggle consuming
>> > hours &
>> >
>> > days & ....
>> >
>> > I am trying to create an SQL database programatically . But my code
>> > stalls before it gets started, and can't establish a connection to
>> > SQL
>> > Server.
>> > Here is my code:
>> >
>> > =============== =============== =============== ===========
>> >
>> > Sub MakeDatabase()
>> > Dim cn As New SqlConnection, cmd As New SqlCommand
>> > Dim connect$, sql$
>> >
>> > connect$ = "Data Source=(local); Integrated Security=SSPI;
>> > Initial Catalog=;"
>> > cn.ConnectionSt ring = Connect$
>> >
>> > Try
>> > cn.Open()
>> > Catch ae As SqlException
>> > MsgBox(ae.Messa ge.ToString, MsgBoxStyle.Cri tical, "SQL
>> > Connection")
>> > Exit Sub
>> > End Try
>> >
>> > sql$ = "CREATE DATABASE Cf"
>> >
>> > cmd.Connection = cn
>> > cmd.CommandText = sql$
>> > cmd.ExecuteNonQ uery()
>> >
>> > cn.Close()
>> > End Sub
>> >
>> > This thing stalls and can't connect, giving me an error #5. The
>> > error
>> > message suggest that my installed SQL might not allow "remote
>> > access".
>> > But I checked and it does. I am using VB 2005 Express and SQL 2005
>> > Express.
>> >
>


Jun 14 '06 #12
bob
Cor,

I see what you been there -- your way is (a) consistent with the way
other objects work in vb, and (b) clear to others that don't know vb.

I would point out re (b), that no one is going to be studying my
programs that is (a) not me, or (b) doesn't already know vb. I don't
think vb beginners are going to be using my programs to learn on!

Regarding (a), there is a certain consistency to my method, because
other common types (though not all) also can use a suffux, such as %
for integer.Remembe r that its nice to have a reminder of the type of
variable in the body of the procedure. Lots of people use the prefix
system -- eg, strName -- to remind them. But "Name$" is to me a lot
better than "strName". With the latter, you are constantly seeing first
the "str" instead of the actual name of the variable, and it gets old.
The other way, you can just tack on $ at the end and know its a string.

Also, I often use one-letter variable names (such a "s" for a string I
might need, "n" for a number type, etc.) If I don't have a reminder of
which ones are strings, I can get confused. In such cases, "s$" is
makes a lot more sense than "strS"

Anyway, as you say, its all what you prefer and/or what you are used
to. I just think my system is as good or better than the "strName"
approach I see in books everywhere, and I get sick of that system and
can't understand why more people don't at least mention mine. By the
way, I notice that some very good authors do actually use my system,
such as the author of the book on Windows API for Visual Basic. Check
it out.
Cor Ligthert [MVP] wrote:
Bob,

It is in my idea not consistent (the last format we don't talk about that is
only possible with option strict of) and therefore something extra to remind
or to check for if you are not used to it.

Dim Str$ is the exception.

Dim str as String
Dim whatever as MyClass
Dim .. as etc etc.

Therefore in my idea
Dim str as String
tells directer to people (what program language they are used) what you
mean.

However feel free to do it your way, it is only my opinion.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
Cor,

I'm glad you brought that up -- I am just in love with those "old
literals". I guess you mean by that that

Dim sql as String

is preferred to

Dim sql$

I think the last form is so much better. Especially when you see people
doing this:

Dim strSql

See what I mean?

(A lot of people must like the "sql$" approach, because I notice that
MS (after threatening to drop this capability) kept it in VB.NET all
the way through VB.NET 2005.
Cor Ligthert [MVP] wrote:
Bob,

When I had sent my both messages and had read the answers from Peter and
Kerry I saw as well the answer to your problem.

For that there was no need for me to sent another message. Your code is
however in a very personal style: good readable probably by VB diehards,
but
not as we see code today. That was what I did mean with my text about the
mystring$. To say it in other words the old literals are not so common
anymore.

In my opinion( but not mine alone) is one of the first commands to create
a
program using a program language as VBNet, is to make it maintainable by
others.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
> Cor, I'm not sure I understand you about still using "sql$". Anyway, I
> got the problem fixed, and thanks for the help.
>
> Bob
>
>
> Cor Ligthert [MVP] wrote:
>> Bob,
>>
>> Have a look at this sample on our website.
>>
>> http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8
>>
>> I think there is more in than you need, but the information you can
>> use.
>>
>> You are the first one who uses still sql$ by the way in these
>> newsgroups
>> and
>> I have seen much.
>>
>> There is nothing wrong with that, however as written tomorrow by
>> GhostAD,
>> you don't write a program for the computers, write it to let others
>> know
>> what you are doing.
>>
>> I hope this helps,
>>
>> Cor
>>
>> <bo*@datasync.c om> schreef in bericht
>> news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
>> > Can anyone help me connect to SQL Server???
>> >
>> > I am new to all this... it is been a titanic struggle consuming
>> > hours &
>> >
>> > days & ....
>> >
>> > I am trying to create an SQL database programatically . But my code
>> > stalls before it gets started, and can't establish a connection to
>> > SQL
>> > Server.
>> > Here is my code:
>> >
>> > =============== =============== =============== ===========
>> >
>> > Sub MakeDatabase()
>> > Dim cn As New SqlConnection, cmd As New SqlCommand
>> > Dim connect$, sql$
>> >
>> > connect$ = "Data Source=(local); Integrated Security=SSPI;
>> > Initial Catalog=;"
>> > cn.ConnectionSt ring = Connect$
>> >
>> > Try
>> > cn.Open()
>> > Catch ae As SqlException
>> > MsgBox(ae.Messa ge.ToString, MsgBoxStyle.Cri tical, "SQL
>> > Connection")
>> > Exit Sub
>> > End Try
>> >
>> > sql$ = "CREATE DATABASE Cf"
>> >
>> > cmd.Connection = cn
>> > cmd.CommandText = sql$
>> > cmd.ExecuteNonQ uery()
>> >
>> > cn.Close()
>> > End Sub
>> >
>> > This thing stalls and can't connect, giving me an error #5. The
>> > error
>> > message suggest that my installed SQL might not allow "remote
>> > access".
>> > But I checked and it does. I am using VB 2005 Express and SQL 2005
>> > Express.
>> >
>


Jun 14 '06 #13
bob
CT --

Check out my last response to Cor's comments, it gives my opinion on
this about as well as I can explain it. Thanks for your comments
though. btw, while I freely use the suffixs when they are available for
a particular data type, I don't tack them onto the numeric variables
(such as "n%") in the body of my procedures, I just use the $ in the
body, to remind me which ones are strings.
CT wrote:
I agree with Cor; the use of type declaration characters is strongly
discouraged. One reason is that there isn't a type declaration character for
all data types, and it makes it difficult for other developers that aren't
used to read code you have written using type declaration characters.
Obviously it is a matter of preference, but personally I find code with type
declaration characters hideous and downright difficult to read, but hey
that's just my opinion. :-)

Another issue you touch upon Cor, is that of using Hungarian Notation (VB
prefixes such as str, int etc.), which is also discouraged. FxCop would help
here. :-)

Just my $0.02

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:uL******** ******@TK2MSFTN GP05.phx.gbl...
Bob,

It is in my idea not consistent (the last format we don't talk about that
is only possible with option strict of) and therefore something extra to
remind or to check for if you are not used to it.

Dim Str$ is the exception.

Dim str as String
Dim whatever as MyClass
Dim .. as etc etc.

Therefore in my idea
Dim str as String
tells directer to people (what program language they are used) what you
mean.

However feel free to do it your way, it is only my opinion.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
Cor,

I'm glad you brought that up -- I am just in love with those "old
literals". I guess you mean by that that

Dim sql as String

is preferred to

Dim sql$

I think the last form is so much better. Especially when you see people
doing this:

Dim strSql

See what I mean?

(A lot of people must like the "sql$" approach, because I notice that
MS (after threatening to drop this capability) kept it in VB.NET all
the way through VB.NET 2005.
Cor Ligthert [MVP] wrote:
Bob,

When I had sent my both messages and had read the answers from Peter and
Kerry I saw as well the answer to your problem.

For that there was no need for me to sent another message. Your code is
however in a very personal style: good readable probably by VB diehards,
but
not as we see code today. That was what I did mean with my text about
the
mystring$. To say it in other words the old literals are not so common
anymore.

In my opinion( but not mine alone) is one of the first commands to
create a
program using a program language as VBNet, is to make it maintainable by
others.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
> Cor, I'm not sure I understand you about still using "sql$". Anyway, I
> got the problem fixed, and thanks for the help.
>
> Bob
>
>
> Cor Ligthert [MVP] wrote:
>> Bob,
>>
>> Have a look at this sample on our website.
>>
>> http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8
>>
>> I think there is more in than you need, but the information you can
>> use.
>>
>> You are the first one who uses still sql$ by the way in these
>> newsgroups
>> and
>> I have seen much.
>>
>> There is nothing wrong with that, however as written tomorrow by
>> GhostAD,
>> you don't write a program for the computers, write it to let others
>> know
>> what you are doing.
>>
>> I hope this helps,
>>
>> Cor
>>
>> <bo*@datasync.c om> schreef in bericht
>> news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
>> > Can anyone help me connect to SQL Server???
>> >
>> > I am new to all this... it is been a titanic struggle consuming
>> > hours &
>> >
>> > days & ....
>> >
>> > I am trying to create an SQL database programatically . But my code
>> > stalls before it gets started, and can't establish a connection to
>> > SQL
>> > Server.
>> > Here is my code:
>> >
>> > =============== =============== =============== ===========
>> >
>> > Sub MakeDatabase()
>> > Dim cn As New SqlConnection, cmd As New SqlCommand
>> > Dim connect$, sql$
>> >
>> > connect$ = "Data Source=(local); Integrated Security=SSPI;
>> > Initial Catalog=;"
>> > cn.ConnectionSt ring = Connect$
>> >
>> > Try
>> > cn.Open()
>> > Catch ae As SqlException
>> > MsgBox(ae.Messa ge.ToString, MsgBoxStyle.Cri tical, "SQL
>> > Connection")
>> > Exit Sub
>> > End Try
>> >
>> > sql$ = "CREATE DATABASE Cf"
>> >
>> > cmd.Connection = cn
>> > cmd.CommandText = sql$
>> > cmd.ExecuteNonQ uery()
>> >
>> > cn.Close()
>> > End Sub
>> >
>> > This thing stalls and can't connect, giving me an error #5. The
>> > error
>> > message suggest that my installed SQL might not allow "remote
>> > access".
>> > But I checked and it does. I am using VB 2005 Express and SQL 2005
>> > Express.
>> >
>



Jun 14 '06 #14
Bob,

Feel free to do it the way you like.
By the way, I notice that some very good authors do actually use my
system,
such as the author of the book on Windows API for Visual Basic. Check
it out.

Did you know that I had in past sometimes long discussion about given
solutions with API's.

The first thing they took than was an API while there were decent Net
solutions.

You don't see those solution almost no more (expect there where really
needed and that is seldom).

About what you wrote, you are right that not everybody is using the same
methods to declare. Although I try to avoid forever global or in top of a
method placed names. Which makes it me easy to see what the format of
something is, but even that is not standard.

Cor

Cor Ligthert [MVP] wrote:
Bob,

It is in my idea not consistent (the last format we don't talk about that
is
only possible with option strict of) and therefore something extra to
remind
or to check for if you are not used to it.

Dim Str$ is the exception.

Dim str as String
Dim whatever as MyClass
Dim .. as etc etc.

Therefore in my idea
Dim str as String
tells directer to people (what program language they are used) what you
mean.

However feel free to do it your way, it is only my opinion.

Cor

<bo*@datasync.c om> schreef in bericht
news:11******** *************@y 43g2000cwc.goog legroups.com...
> Cor,
>
> I'm glad you brought that up -- I am just in love with those "old
> literals". I guess you mean by that that
>
> Dim sql as String
>
> is preferred to
>
> Dim sql$
>
> I think the last form is so much better. Especially when you see people
> doing this:
>
> Dim strSql
>
> See what I mean?
>
> (A lot of people must like the "sql$" approach, because I notice that
> MS (after threatening to drop this capability) kept it in VB.NET all
> the way through VB.NET 2005.
>
>
> Cor Ligthert [MVP] wrote:
>> Bob,
>>
>> When I had sent my both messages and had read the answers from Peter
>> and
>> Kerry I saw as well the answer to your problem.
>>
>> For that there was no need for me to sent another message. Your code
>> is
>> however in a very personal style: good readable probably by VB
>> diehards,
>> but
>> not as we see code today. That was what I did mean with my text about
>> the
>> mystring$. To say it in other words the old literals are not so common
>> anymore.
>>
>> In my opinion( but not mine alone) is one of the first commands to
>> create
>> a
>> program using a program language as VBNet, is to make it maintainable
>> by
>> others.
>>
>> Cor
>>
>> <bo*@datasync.c om> schreef in bericht
>> news:11******** *************@y 43g2000cwc.goog legroups.com...
>> > Cor, I'm not sure I understand you about still using "sql$". Anyway,
>> > I
>> > got the problem fixed, and thanks for the help.
>> >
>> > Bob
>> >
>> >
>> > Cor Ligthert [MVP] wrote:
>> >> Bob,
>> >>
>> >> Have a look at this sample on our website.
>> >>
>> >> http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8
>> >>
>> >> I think there is more in than you need, but the information you can
>> >> use.
>> >>
>> >> You are the first one who uses still sql$ by the way in these
>> >> newsgroups
>> >> and
>> >> I have seen much.
>> >>
>> >> There is nothing wrong with that, however as written tomorrow by
>> >> GhostAD,
>> >> you don't write a program for the computers, write it to let others
>> >> know
>> >> what you are doing.
>> >>
>> >> I hope this helps,
>> >>
>> >> Cor
>> >>
>> >> <bo*@datasync.c om> schreef in bericht
>> >> news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
>> >> > Can anyone help me connect to SQL Server???
>> >> >
>> >> > I am new to all this... it is been a titanic struggle consuming
>> >> > hours &
>> >> >
>> >> > days & ....
>> >> >
>> >> > I am trying to create an SQL database programatically . But my
>> >> > code
>> >> > stalls before it gets started, and can't establish a connection
>> >> > to
>> >> > SQL
>> >> > Server.
>> >> > Here is my code:
>> >> >
>> >> > =============== =============== =============== ===========
>> >> >
>> >> > Sub MakeDatabase()
>> >> > Dim cn As New SqlConnection, cmd As New SqlCommand
>> >> > Dim connect$, sql$
>> >> >
>> >> > connect$ = "Data Source=(local); Integrated Security=SSPI;
>> >> > Initial Catalog=;"
>> >> > cn.ConnectionSt ring = Connect$
>> >> >
>> >> > Try
>> >> > cn.Open()
>> >> > Catch ae As SqlException
>> >> > MsgBox(ae.Messa ge.ToString, MsgBoxStyle.Cri tical, "SQL
>> >> > Connection")
>> >> > Exit Sub
>> >> > End Try
>> >> >
>> >> > sql$ = "CREATE DATABASE Cf"
>> >> >
>> >> > cmd.Connection = cn
>> >> > cmd.CommandText = sql$
>> >> > cmd.ExecuteNonQ uery()
>> >> >
>> >> > cn.Close()
>> >> > End Sub
>> >> >
>> >> > This thing stalls and can't connect, giving me an error #5. The
>> >> > error
>> >> > message suggest that my installed SQL might not allow "remote
>> >> > access".
>> >> > But I checked and it does. I am using VB 2005 Express and SQL
>> >> > 2005
>> >> > Express.
>> >> >
>> >
>

Jun 14 '06 #15

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

Similar topics

0
2550
by: Ali | last post by:
I'm trying to write a really basic chat program that allows 2 client programs to send messages to each other via a server. I've managed to write the code so that both clients can connect to the server and send and recieve messages to/from the server but when I send a message from one client I can't get the message to appear in the second client. I think it's something to do with threads but I don't know what! I've been looking at the...
1
3799
by: Dmitry Akselrod | last post by:
Hello everyone, I have a vb.net application that wraps the TCPListener object in a class. The server connects to the local interface and establishes itself on port 9900. It then polls for pending connections every 500ms. I also have a vb6 application that uses the WinSock control at the other end of the communication tunel. I have to work with vb6 here because it uses less memory than .NET.
12
2797
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed both the iis and sql server in a single machine. Not too long ago, the machine had some hardware problems, and management has decided to purchase new servers, for both asp.net and sql server.
0
1923
by: richard | last post by:
OS: Winxp and Win2003 Visual Basic.NET 2003 MS-SQL Server 2000 hey all I am a newbie in vb.net but i have managed to build a simple chat server in vb.net using socket and a client connecting to it made in vb6. Some of the code in the server are based on the basic samples that i get from other authors. To give you an idea, the server uses sockets,
2
3566
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the custom membership provider fine and removes the security question/answer fields as designated in the custom provider. The problem is that when I try to create a new user in the create user wizard by entering the info and pressing the 'create...
9
2706
by: RvGrah | last post by:
After much hair-pulling, I've finally found the answer to a problem that many are fighting with, difficulty connecting from Sql 2005 Server Management or VS2005 to a remote Sql Server running Sql 2000. In my case the server I couldn't reach was across a vpn connection, behind ISA server 2000, (which had port 1433 open). The answer was in this post:...
0
3927
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2 development client. Bur Its gives me following error message. I searched lots of things on net and tried on remote server but i didnt got suceess. Can any one tell me how to set TCP\IP connection protocol on server for particular instance. Becuase I think
0
2872
by: NoaGross | last post by:
Hi, I'm relly new in java and I have a problem. I'm using java applet. When using http all ok, but when trying to use https i get: Java Plug-in 1.5.0_10 Using JRE version 1.5.0_10 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\noa ---------------------------------------------------- c: clear console window
9
4305
by: darthghandi | last post by:
I am trying to create a server application using asynchronous sockets. I run into a problem when I try to connect to my server using a non-.net program. I can establish the connection, and send some packets in response to the programs first message, but when I receive a response back, it's the last packet I sent. After that packet, I receive the packet I really wanted. This only happens when I connect with local host. I tried...
2
3047
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error. Here is the error:
0
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9587
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7623
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.