|
where did u specified ur connection string?
|
|
|
|
|
My Web.Config file
configuration
appSettings
add key="connstring" value="data source=192.168.0.18;database=ABDATABASE;user id=sa; password=;
appSettings
system.web
Senior Software Engineer
Nothing is Impossible Even Impossible says I'MPOSSSIBLE
-- modified at 4:30 Wednesday 1st March, 2006
|
|
|
|
|
<add key="psmConnectionString2" value="server=ServerName;database=DataBase;uid=sa;pwd=sa;">
Is this your connection string or some other
Just print using
lblMessage.Text =ConfigurationManager.AppSettings("psmConnectionString2"));
Response.End();
If ur label gets the Connection string value u have declared then ur connection string and D connection is correct
Other wise problem with connection string declaration /DB Connection
Senior Software Engineer
Nothing is Impossible Even Impossible says I'MPOSSSIBLE
|
|
|
|
|
it return nuthing.the page when blank.whats wrong?
|
|
|
|
|
That means that u are not getting ur connection string in the label
So problem with connection string
Have u delclatred it like this or not
<add key="strCon" value="server=Name/IP;database=DBName;uid=sa;pwd=sa;">
here strCon is My connection stirng
Senior Software Engineer
Nothing is Impossible Even Impossible says I'MPOSSSIBLE
|
|
|
|
|
could u show me one of ur example?
|
|
|
|
|
The error is in your connection string, no the code.
The format of the connection string is "keyword=value;keyword=value;...;keyword=value". What you have put in the connection sting does not follow this syntax.
---
b { font-weight: normal; }
|
|
|
|
|
where should i change.is it in the web config?
|
|
|
|
|
Yes.
---
b { font-weight: normal; }
|
|
|
|
|
there is an error:
Unrecognized attribute 'keyword'. Note that attribute names are case-sensitive.
the code is:
add keyword="name=psmConnectionString2" keyword1="connectionString=Data Source=HAPPYFAM-B614E1\SQLEXPRESS;Initial Catalog=psm;Integrated Security=True"<br />
providerName="System.Data.SqlClient" <br />
-- modified at 4:06 Wednesday 1st March, 2006
|
|
|
|
|
The attribute names in the tag shold be "key" and "value", not "keyword", "keyword1" and "providerName".
Remove "connectionString=" from your connection string. Remove the providerName attribute.
---
b { font-weight: normal; }
|
|
|
|
|
pandapatin wrote: Dim MyConn As New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString2"))
Can you paste the value for the key psmConnectionString2 in Web.config to obtain better picture.
Sneha
|
|
|
|
|
I'm a beginner of VB and using VB6 now.
I know VB can use DLL developed by VC, but can VB use static library? and how?
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
I write a function in VC just like this:
int add(int a)
{
return ++a;
}
then I get a file named LibTest.lib.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
I put LibTest.lib under the directory of VB project and write these code in the form code view.
Option Explicit
Private Declare Function add Lib "LibTest.lib" (ByVal a As Integer) As Integer
Private Sub Form_Load()
Print add(5)
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
but when I execute this project, it tells me "Run-time error ‘53’,file not found: LibTest.lib", why?
hello guys!
|
|
|
|
|
superSYNC wrote: I know VB can use DLL developed by VC, but can VB use static library? and how?
The quick answer is No. VB cannot use static libraries.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
|
Hi,
I have developed a Windows application in VB.Net 2003, which uses a datagrid to display numerical data. I now need to get various cells of the data grid to change color depending on the numerical value the cell contains. I would really appreciate some code as I am out of time for this project.
Thanks in advance.
Larry
|
|
|
|
|
|
Thanks Dean. It worked. That is a great link - lot of useful info.
All the best,
Larry
|
|
|
|
|
Hi,
I am developing an application in which i have to create a browse button and a list box. as soon as the user clicks on the browse button, he gets an option to choose a directory from the hard disk. As soon as he chooses a folder, the contents of the folder are displayed in the list box.
Can someone help me on this?
Thanks
|
|
|
|
|
united18 wrote: Can someone help me on this?
Post editted because I misunderstood your question...
You can use the folderBrowserDialog or openFileDialog object. Just drag an instance of this onto your form. Change the Browse button's Click() event to show one of the above objects and use that object's properties and methods to determine the user's selection.
There is more comprehensive help contained in the Visual Studio help files.
There are some sample programs on MSDN?.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
-- modified at 20:12 Tuesday 28th February, 2006
|
|
|
|
|
Thanks Steve.
|
|
|
|
|
The openFileDialog object may be a better fit for your application.
Again, sorry I misunderstood your question. I have updated my earlier response to reflect this.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
lets say i have 2 winforms A and B
on A i have a button that pops B
like
Private Sub btnPoP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPoP.Click
Dim aFrmAlertPopUp As New B(SomeUniqueID)
aFrmAlertPopUp.display(messages)
End Sub
it will pop a instance of B, it will pass a number id value to the property SomeUniqueID of B.
lets say i click the button 3 times and pass the values
Dim aFrmAlertPopUp As New B(123)
Dim aFrmAlertPopUp As New B(456)
Dim aFrmAlertPopUp As New B(789)
then I want to terminate only instance '456'
if I call
aFrmAlertPopUp.stop(), it kills the 3
is it possible to use something like getProperty to get 1 of the 3 instances and stop it?
|
|
|
|
|
What you've done here is to create a new instance of form B each time the button is pressed on form A, but you have not stored the reference to that form object anywhere.
In effect you have lost the reference to each form after you exit form A's btnPoP_Click() event handler.
You need to keep the references to all forms created in a 2-dimensional array or even better - a Hashtable. That array or Hashtable needs to be instantiated outside of the Click() event - perhaps in form A's initialization.
Whenever you create a new form B in btnPoP_Click() , store the new form B's reference into the array or Hashtable along with the unique data value to identify it.
...Steve
Quote: Artificial Intelligence is no match for natural stupidity
|
|
|
|
|
Can any one give me a code sample that returns 'miles' between two postcodes using the Mappoint Web Service, i have an account and looked at the samples but i just cant do it...
|
|
|
|