|
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)
|
|
|
|
|
I am developing an Access 2000 database application. In my application, I need to connect to a remote Access 2000 database to retrieve and update data. I tried to use RDS (Remote Data Service) as mentioned in MSDN but failed (it raised a runtime error 8447: Internet Server Error).
Dim cn as ADODB.Connection
Dim rs as ADODB.Recordset
cn.Open "Provider=MS Remote; Remote Server=http://myServer; Data Source=sample.mdb"
Set rs = cn.Execute(mySelect)
Do I need any configurations on the server to make the above code work? Or are there any way else? Please help me, thanks.
Lan hue sau ai lan hue heo
Lan hue sau doi trong heo ngoai tuoi
|
|
|
|
|
|
Thanks for you help!
Lan hue sau ai lan hue heo
Lan hue sau doi trong heo ngoai tuoi
|
|
|
|
|
hi,
I have a store procedure that needs to set of values if the record is found in the table and if it doesnt find any row in the table I a have to send some columns with some fix values and I dont want to send other columns but as I am filling the same dataset I have to send some value in these feilds so I am sending "null" value.
How do I handle this null value in the C# code.It is like if I get null value then I dont want to override value in that feild.
Can any one help me in doing this.
Thanking you in advance,
Satish.
|
|
|
|
|
hi there,
satishrg wrote:
How do I handle this null value in the C# code
refer to DBNull class in MSDN
<< >>
|
|
|
|
|
Hi,
I'm trying to read and Excel Workbook using excel, all goes fine but not the dates, depending on regional settings sometimes I got numbers instead of dates when I read using ADO .net
The problem it's on the regional settings I guess, sometimes I just save the Excel workbook (even with the same regional settings), and when I read I get an ugly number, something 38564...
Any ideas about this issue ? Thanks in advance, Greetings
Braulio
|
|
|
|
|
Well...
It seems that Excel just mess up dates if some user has different regional settings... the good news are that the number that you get has some sense... it's the number of days since a 1900 date, here is a link that explains how that works:
http://www.cpearson.com/excel/datetime.htm[^]
Greetings
Braulio
|
|
|
|
|
Hi everyone,
im going to send an xml file containing about 3000 records to a stored procedure using asp.net, to make a bulk update operation on the DB.
The update will depend on the Date of each row, and the date in the DB, for example, if the Date in the DB was less than the date in row that has the update data, then the update will be done, else the update will fail.
i need to get the update status of each the 3000 row, and i should return it back to asp.net to display it for the user...
so how a thing like this can happen?
i dont want to access the DB from the code 3000 times
for example can i update the xml that i sent to the stored procedure and return it back to the page..
if anyone has any ideas, just pls send it
million thanks
Mahmoud Manasrah
-- modified at 4:19 Wednesday 28th September, 2005
|
|
|
|
|
hello everybody,
I have an sql statement that I want to automatially run at the beguining of each month from server side. I'm using sql server 2000 and didn't find anything about dbmsjobs in sql!
Can anybody help me with that please
-- modified at 15:23 Tuesday 27th September, 2005
|
|
|
|
|
You can set up a job that the SQL Server Agent will perform for you on the schedule that you want.
Go in to Enterprise Manager, Open the server that you want the job to run on, select the Management folder and then SQL Server Agent and finally Jobs.
You can right-click on Jobs and select New Job... and you'll get a dialog that will allow you to define the job.
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
|
|
|
|
|
- Create a DTS Package that will run that SQL statement
( ->Data Transformation Services -> Local Packages )
- Schedule it to run at designated time / interval
( ->Management ->SQL Server Agent ->Jobs )
Best
Bigfootguy
|
|
|
|
|
|
what do u think abt triggers.HUH!u can write triggers that will execute it on 1st of every month.
get back to me
|
|
|
|