|
Then how are you managing to configure it between using localhost and the computer name?
At a guess (as I've never come across this problem) you probably need to ensure that SQL Server is set up to use TCP/IP as a communications mechanism - and you need to ensure you have a network adapter for the communications to route through (even although it will just get looped back).
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
When
Colin Angus Mackay wrote:
Then how are you managing to configure it between using localhost and the computer name?
when i wrote my application using local host it dose not work when i replace it with computer name it works
the problem the application that i do not write it it give me the error and i can not change the connection string and
SQL Server is set up to use TCP/IP as a communications mechanism
|
|
|
|
|
How can I find out programatically all the ODBC Drivers avaliable on a system?
Hope I understand...because is a rough world out there...
|
|
|
|
|
|
Thank you
I hope you understand...because is a rough world out there...
|
|
|
|
|
Hi there,
following my last question where I inserted data coming from different tables, I displayed these data using crystal report. Up to here everything is fine. The data displayed is grouped by Appartment Code Id field.In my report, data look like this:
Appartement Code : 1737/R1
inhaitant Name: Mike Jones
|month |Amount due
|07-2005 |100
|08-2005 |100
total Due:200
Appartement Code : 1737/R2
Inhabitant Name: Emilie carter
|month |Amount due
|06-2005 |100
|07-2005 |100
total Due:200
As these are grouped by Appartement Id each time I click on the appartment Id A new page with only the group information is displayed on a separate page.
What I want to know is how can I custom this page so that It can e used as a letter to my client?
example of what I need:
Once I click on 1737/R2
I want to get in a new page:
Dear Mr/miss Emilie Carter,
I'm glad to announce you that you owe me a total of 200$ for the rent of your appartement for the unpaid periods of 06-07 2005.
compliments
Something like that!
If you can help please do!
anyOne who shows you something you ignore gave you a real tresure!he's your master.To thank him,transmit what you learned
|
|
|
|
|
Hi all,
How to package sql server database as part of our custom application (VB application) using install shield or any software.
That setup should detect the presence of sql server. If sql server is not present in the client machine, then our set up should install the sql server and deploy our database.
If sql server is present in the client machine, then our set up should install our database alone. How to do that. Please help me.
Regards,
S.Sevugan.
|
|
|
|
|
By license, you can't distribute SQL Server with your application. Your user has to install it manually. But you can create a database in an already-installed SQL Server.
There's actually a version of SQL Server that you can distribute. It's called MSDE, but it has certain limitations for very big databases. Search MSDN for MSDE.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
when you get your solution plz email it to ndnzuza@gmail.com
|
|
|
|
|
OK, forget the bit about SQL Server being a piece of licenced software; if we assume the client already has SQL Server, what is the best way to deploy the database we've designed ? Is it a backup/restore ?
|
|
|
|
|
Create a sql script for your database and run it on the client side. I think this is the best way. You can also script any basic data that you may need populated at the start.
|
|
|
|
|
Hi. I've this question:
I have IIS (and dot net environment) and MS SQL msde on same machine (MS Windows 2000 server).
For security reason I've switched off all network protocols of Sql.
(sql is listening on shared memory)
Is it still possible to connect to sql (not using odbc) ??
I nedd to modify my ADO.NET connection string?
Could someone showme an exemple?
thanks to anyone.
|
|
|
|
|
darXstar wrote:
Is it still possible to connect to sql (not using odbc) ??
I've never tried that configuration, but it should be possible.
darXstar wrote:
I nedd to modify my ADO.NET connection string?
darXstar wrote:
I nedd to modify my ADO.NET connection string?
I wouldn't think so, why not just try it? I've got loads of apps lying around that were just to try out something where the docs didn't give a complete explanation or I just wanted to see how something worked in isolation.
darXstar wrote:
Could someone showme an exemple?
Of what? Connecting to a SQL Server database using ADO.NET.
string connectionString = "server=(local);database=myData;uid=a;pwd=b";
SqlConnection conn = new SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "myStoredProcedure";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = conn;
SqlReader reader = cmd.ExecuteReader();
while(reader.Read())
{
}
Does this help?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Hi, and thanks for reply. You have right. Why don't try?
The truth is that I was almost sure this configuration was working on my test server... but today doesn't work anymore...
While I keep switched off TCP protocol of sql server, I can not access it from asp.net web applications. the result is "Server doesn't exist or access denied". I am little bit confused... I can't tell if this configuration should work or not...
About connection string I was asking someone if there are a specific one using "Shared Memory" access mode.
anyone is experienced?
thanks again
|
|
|
|
|
When you install MSDE, the installation is unattended (or silent), rather than interactive.
I need to specify collation, but it does not allow me to do it, installing instead the default which is no good for me.
How can I select (or change) a collation in MSDE?
Thanks.
Best
Bigfootguy
|
|
|
|
|
set COLLATION parameter when you run msde Setup :
setup COLLATION="Latin1_General_CI_AI" DATADIR="C:\" TARGETDIR="C:\Programmi\Microsoft SQL Server\" /L*v C:\msdelog.txt SAPWD="[your passw]"
Latin1_General_CI_AI means Case_Insensitive Accent_Insensitive
you can specify also CI_AI_KI for Katana an so on..
option not specified means default value.
darx
|
|
|
|
|
Hello folks,
I am confused at to whether to use bitmask to store values in my database. I am working on a web application with MSSQL 2K and C# asp.net. My requirement is to store the options chosen from a CheckBoxList control into the database and be able to search if a user has selected a particular choice.
An analogy would a Question, what Model cars have you driven.
Answer Choices: Honda, Toyota, Peugeot, Lancia, Fiat
A user can choose one or many.
I could store the Answer chosen in a separate table and do a join to search but I read somewhere that I could store all the values in one field in the Users table hence eliminating the need to create a new table.
Does anyone have any ideas, links to tutorials and sample code on how to do this? I very much welcome all suggestions.
Thanks
Mike
|
|
|
|
|
Let's say you've just got 2 types of car: Honda, Toyota
if i've driven a honda i have the value 10 (2)
if i've driven a toyota i have the value 01 (1)
if i've driven both then i have the value 11 (3)
use the same system for the cars your checking for.
Example 1
Uservalue = 11(3) (driven both)
Carvalue = 01(1) (just a toyota)
If we use a bitwise AND ( check each digit in turn and iff they are both 1 place a 1 in the corresponding digit of the result) we get the value 01. Comparing this to the carvalue we find that the user has indeed driven a toyota.
IF uservalue & Carvalue = Carvalue
BEGIN
PRINT 'Has Driven a toyota'
END
This sytem extends to as many bytes as the biggest int available to you.
Example 2:
Uservalue = 110110110110110110
CarValue = 100110100010110010
Result = 100110100010110010 (The user has driven all the cars specified in CarValue)
To Create the bitmasks use a logical OR, or just add the numbers together
CarValue = Toyota | Honda is equivalent to Carvalue = Toyota + Honda using bitmasks, but if you use the OR sysntax for complicated expressions you will never be able to add the same car twice which would cause problems.
HTH
Russ
-- modified at 11:59 Monday 3rd October, 2005
|
|
|
|
|
I am having some difficulty in getting my .NET application to work as desired using an Oracle database (I am using the Oracle Data Provider for .NET). In particular, my ComboBox no longer contains any items.
I had a SQL table:
CREATE TABLE [dbo].[tblTitles] (<br />
[TitleID] [int] IDENTITY (1, 1) NOT NULL ,<br />
[TitleDisplayText] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,<br />
[TitleHidden] [bit] NULL CONSTRAINT [DF_tblTitles_TitleHidden] DEFAULT (0),<br />
CONSTRAINT [PK_Titles] PRIMARY KEY CLUSTERED <br />
(<br />
[TitleID]<br />
) ON [PRIMARY] <br />
) ON [PRIMARY]
and created a complementary (I think) Oracle table:
CREATE SEQUENCE tblTitles_TitleID_SEQ<br />
START WITH 1<br />
INCREMENT BY 1<br />
/<br />
<br />
CREATE TABLE tblTitles <br />
(<br />
TitleID int NOT NULL , <br />
TitleDisplayText VARCHAR2 (50) NULL , <br />
TitleHidden NUMBER(1) DEFAULT 0 NULL , <br />
CONSTRAINT PK_Titles PRIMARY KEY (TitleID) <br />
)
My Code (which worked against SQL Server table, but not against Oracle):
DataSet dsTitles = new DataSet("Titles");<br />
OpenConnection();
OracleCommand tableCommand = null;<br />
tableCommand = dbConnection.CreateCommand();<br />
tableCommand.CommandText = "select TitleID, TitleDisplayText FROM tblTitles WHERE TitleHidden <> 1 ORDER BY TitleDisplayText";<br />
<br />
OracleDataAdapter adapter = new OracleDataAdapter();<br />
adapter.SelectCommand = tableCommand;<br />
adapter.Fill(dsTitles, "Titles"); <br />
<br />
comboBoxTitle.BeginUpdate();<br />
comboBoxTitle.DataSource = dsTitles.Tables["Titles"];<br />
comboBoxTitle.DisplayMember = "TitleDisplayText";<br />
comboBoxTitle.ValueMember = "TitleID";<br />
comboBoxTitle.EndUpdate();
If I create an OracleDataReader and execute the query, adding each item to the ComboBox, it displays, but this takes a considerable amount of time.
Any ideas on what I'm doing wrong, or not doing? If this is not the best place to ask, kindly advise a better place.
Thanks,
Glenn
|
|
|
|
|
1. Instead of creating a DataSet, create a DataTable.
DataTable dtTitles = new DataTable();
2. Fill the DataTable with the adapter
adapter.Fill(dtTitles);
3. Bind the datatable
comboBoxTitle.DataSource = dtTitles;
Hope this helps...
Free your mind...
|
|
|
|
|
Thanks. Turns out the problem was solved when I removed the comboBox from the form and created a new comboBox with same settings. Worked on all that were causing me grief.
--G
|
|
|
|
|
I have to write a small application where a GUI accesses a DAL (Data Access Layer) through a web service. The GUI and the DAL are on two different computers. My question: where should I store the connection string so the DAL can get it and connect to the database?
Thanks!
|
|
|
|
|
You should use an xml file to store the configuration of the connection string. The xml file may contain the path of encrypted password. The DAL should be able to build the connection string using these attributes.
|
|
|
|
|
If the DAL is on a web service (ASP.NET application), store it encrypted in web.config .
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
Per Microsoft about a year and a half ago, you should store you encrypted connection string in the registry of your web box.
Here's the link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp[^]
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|