|
Asp
connect to ado/ms access file string is like that
conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("testing.mdb") & ";UID=Admin;PWD=password"
How to set the UID and PWD for the "testing.mdb"?
I have tried to set them up with MS Access but it's fail.
Thanks
|
|
|
|
|
ting668 wrote:
I have tried to set them up with MS Access but it's fail.
How have you tried? Via "tools > security > set password"?
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Yes, but it only set the database password but what is the login?
|
|
|
|
|
If you don't have any other user activated it'd be "admin"
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I am trying to write a code for a web site using C# to pass parameters from from1.aspx to a class1.cls
and then pass it again to another cls then execute it in a third class to added to stored procedure in Sql server.
example: user insert first name in front end form1.aspx. then firstname=txtfirstname.Text in form1.cs then pass firstname parameter to another class called member.cls.
and then pass again to third class called EXECUTE.cs class. to insert the record to stored procedure in Sql Database.
my problem is between member.cls and execute.cls
Thanks.
|
|
|
|
|
I assume these are cs, not cls files ?
Their names don't really matter, but it all sounds very convoluted. What's the problem you're having ? You just want to pass parameters from class to class ? If you posted some code, perhaps we could get an idea of what's going on ? Is all this stuff irrelevant, and your problem is just how to call a stored proc from C# ? If so, I answered that question below earlier today.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello,
I'm planning to build a small commercial software for personal use, using C# Windows Forms. What are available database systems that will suit my need? I only know of MS Access but I'm not sure how good it'll work with ADO.NET.
What choices do I have? Please share your ideas.
Thanks a lot.
|
|
|
|
|
Access will work fine, if you can live within it's limitations. I prefer MSDE most of the time, but then, I have MSDE/SQL Server installed all the time anyhow.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The problem with MSDE is that, eventhough I can automatically have it installed on client's machine, still 50 MBs need to be downloaded to his machine.
Have you heard of Firebird? It's a free database system. http://firebird.sourceforge.net/
|
|
|
|
|
nad2263 wrote:
The problem with MSDE is that, eventhough I can automatically have it installed on client's machine, still 50 MBs need to be downloaded to his machine.
Wrong. I distribute an app with MSDE, the PCs are offline, and it all works.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I've used VistaDB[^]. It's like Access in that the database is contained in a single file. And the footprint is minimal, 2 DLLs and about 500 KB total.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I've recently used PostgreSql in a project and I'm very satisfied with the results. It's an open source db system. It isn't a file based db and the footprint is not low but it's very robust.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Thank you all,
Now I can do some research.
|
|
|
|
|
Your example is incomlete and makes no sense in line of the question subject.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a table as such:
word
-----
word - varchar
word_count -int
The word is unique.
How do I do a random selection based on the influence (weight) of word_count?
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
One solution is to add another column to the table, which will store the sum of the word_count field up to and including the current record, then find the maximum value, generate a random number between 0 and the maximum, and select the first record greater than that number.
In MSSQL, it would look something like this:
-- Add the column to the table:
ALTER TABLE dbo.Word ADD WeightScaled int NULL
GO
-- Update the new column
DECLARE @Counter int SET @Counter = 0
UPDATE
dbo.Word
SET
@Counter = WeightScaled = @Counter + Word_Count
UPDATE
dbo.Word
SET
WeightScaled = Null
WHERE
Word_Count <= 0
GO
-- Select a random record
Declare @MaxValue int, @RandomNumber float
SELECT
@MaxValue = MAX(WeightScaled)
FROM
dbo.Word
SET @RandomNumber = rand() * @MaxValue
SELECT TOP 1
Word
FROM
dbo.Word
WHERE
WeightScaled >= @RandomNumber
ORDER BY
WeightScaled
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
And drop the column after I'm done with all the random selects?
(The data should be updatible, which means the word_count is subject to change)
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
If you're going to be issuing the random selects again, it would probably be better to leave the column in place, and run the code to update the column after each update or batch of updates to the table. (If you're expecting the updates to be more frequent than the selects, you could update the column before each select instead.)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
The updates are done in the word collection process.
The random selects are done after the word collectino process. But it dose have the possibility that the word collection process may occur again.(after the random selects are done ofcourse)
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
Hello,
I am having a small problem:
I am using Helper classes for DataAccess.
i have a scenario where i cannot use parameterised query due to some reasons.
Now the problem is when someone search with ' in text; it breaks ans throws exception.
I replaced this with '' but its not working.
Can anyone help on this ?
Regards,
Asim
|
|
|
|
|
How is it not working, is it still throwing an exception ? Or not finding what you expect ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yes, it's still throwning exception.
any solutions ?
Regards,
Asim
|
|
|
|
|
Most people find the quickest way to getting a solution is to report the exact problem, by telling is the type and message of the exception, and providing a code snippet.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I need to get the relationships that exist between the tables in a database. The database structure is unknown to me , i.e at runtime the program connects to any database be it Access or SqlServer. From that database i get the info. related to the tables such as the columns that exist in it, their datatypes,etc but not the table relationship to other tables. For SQL databse i have used this approach - I have used SQLDMO to get the table names. Then generating a select statement e.g: "SELECT * FROM Tablename" and then using DataAdapter.FillSchema method i get the structure of the table. But i also need the realtionships that exist between the tables. Could any one help me??! (Using C#)
|
|
|
|
|
Here's something that will make you scratch your head!
I have a table that has a UniqueIdentifier as its primary key, but also have an autoincrement column (InvoiceNumber) that is not part of the primary key.
This table contains about 3000 records. But for an unknown reason (UFOs???), the last 1500 rows or so have DUPLICATE autoincrement value! The incrementation is done automatically by SQL Server (MSDE).
Here's an example of the values in the InvoiceNumber column:
1
2
3
4
4
5
5
6
6
Any idea what it could be? How can I fix/prevent this?
Thank you very much for your help!
Carl
|
|
|
|