|
Thanks, in fact I have did a test and it behaves that way. Cool.
______________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] and the ScrewTurn Software experiment
|
|
|
|
|
A static instance is just a static reference to a regular instance of the class. Therefore it has the same scope as any static variable.
A static variable is unique at the application level.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: A static variable is unique at the application level.
Cool. I did a test and in fact it works that way.
Thank you.
______________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] and the ScrewTurn Software experiment
|
|
|
|
|
I am working on an ASP.NET project where I make a call to a database. I know how to create a key in the web.config file to point to the actual server, but I made a copy of the database on my local computer and want it to point to that.
Real Server:
<add key="ConnectionString" value="Data Source=SERVER-SQLSC1;Initial Catalog=Parts;User ID=user;Password=morecowbell" />
What I tried for localhost:
<add key = "ConnectionString" value = "Data Source = localhost;Initial Catalog=PartsDB;"/>
(I named the copy PartsDB to avoid confusion.)
What am I doing wrong here?
|
|
|
|
|
Just raise your arm and extend your finger in the direction of your pc...
or use server=(local)
|
|
|
|
|
add key = "ConnectionString" value = "Server=(local);Initial Catalog=PartsDB;"
Like that?
I've been having problems pasting...
|
|
|
|
|
You can try wrapping your code in code tags (formatting below the entry textbox).
And yes.
|
|
|
|
|
Then I get this error...
System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
-- modified at 10:29 Thursday 15th June, 2006
What user do I use?
|
|
|
|
|
How are you connecting to your other db? You'll need to supply a db user name and password (probably sa and blank)...
|
|
|
|
|
Real server:
add key="ConnectionString" value="Data Source=SERVER-SQLSC1;Initial Catalog=Parts;User ID=aspuser;Password=crlamo5"
Trying:
add key = "ConnectionString" value = "Server=(local);Initial Catalog=PartsDB; User ID = aspuser; Password=crlamo5
Get error:
System.Data.SqlClient.SqlException: Login failed for user 'aspuser'. Reason: Not associated with a trusted SQL Server connection
|
|
|
|
|
|
Good site...what I can't figure out is why the "aspuser" works on the real server but not on localhost. I can't find anything different with permissions.
|
|
|
|
|
You could always put in the name of your machine rather than (local). worth a try.
|
|
|
|
|
|
A quick simple question:
I want to query access using only script (I'm using VB), then loop through the data? I know this is easy, and I think it's similar to how I do things in ASP, but does anyone know where a simple tutorial is? Also one for script querying SQL would be great.
Thanks
|
|
|
|
|
a little VBScript should do the trick.....
<br />
dim oConn as ADODB.Connection<br />
oConn.Open(ConnectionStringHere)<br />
<br />
dim oRS as new ADODB.Recordset<br />
oRS.Open ("SELECT * FROM SomeTable", oConn)<br />
<br />
while oRS.EOF = false and oRS.BOF=false<br />
call MyProcessingFuntion()<br />
wend<br />
apologies if it's not quite bang on - been a while since I've done ANY VBS :$
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hello,
I have comming two different columns FirstName and LastName from the datasource. I have no problem in binding it to the gridview. But I need help on how to make FirstName and LastName to be displayed in a single column.
Could some one please help me with that?
Thanks
-L
|
|
|
|
|
select (FirstName + ' ' + LastName) as Name from table
|
|
|
|
|
Yeah I have already done that. But I need to be able to pass these First and Last names to a different page. If I do like you said in the selection of the table I will have to use function like split to split the fname and lname and then display fname and lname seperatley.
Looks like I will have manipulate in the table selection itself.
Thanks for the input,
-L
|
|
|
|
|
use seperatly
select FirstName,Lasntname, (Firstname + ' ' + Lastname)as Name from table
|
|
|
|
|
'ats works too and we can hide the FirstName and LastName columns in the grid. I will try that way .. I mean either way its gonna take enough time in my situation. But I like this idea.
Thanks
-L
|
|
|
|
|
On ItemCommand event of DataGrid just pass the employee no and name by Query String and u will it.If not then please let me know I will tell u how to use Querystring.
Thanks and Regards.
|
|
|
|
|
In addition to grouping the two columns in one, you can simply use the TemplateField in the GridView, and you can bind the two data columns in this template column, for example use two labels controls or place two databinding expressions.
|
|
|
|
|
Hi people,
I'm using a COM object to generate a very large bitmap file. I get this error logged in the event log:
aspnet_wp.exe (PID: 3828) was recycled because memory consumption exceeded the 460 MB (60 percent of available RAM).
Is there any way to increase the percentage of available RAM allocated to the process? (keeping aside the fact that we can add more RAM! )
Thanks,
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Talal Sultan wrote: aspnet_wp.exe (PID: 3828) was recycled because memory consumption exceeded the 460 MB (60 percent of available RAM).
You can see the memoryLimit attribute of the processModel[^] element
|
|
|
|