|
cb2 = CStr (me.cbo2.text)
|
|
|
|
|
Hi,
I am planning to choose an embedded database for my windows application. If I choose MS Access, will my user need Microsoft Office installed in his/her machine in order to use my application ? Can I embed the required libraries so that my application will work without MS Office ?
|
|
|
|
|
You can develop your application in VB.NET or C#.NET and your clients will not need MS-Office installed for your application to run.
You will be delivering an executable (*.exe) and a (*.MDB) file to your customer, all of your compiled code will contain the libraries necessary to read/write data to the MS-Access MDB database.
|
|
|
|
|
Thank you so much. Just one more question. Do you think MS Access is a good choice over SQL Server Compact ? I mean, performance and portability wise.
|
|
|
|
|
MS-Access vs SQL-Server
Depends on the nature of your application.
For example, I built a very small membership application which stores Names, Addresses & Photos of people beloning to a swim club with MS-Access as the data storage. The program is not networked and is very small; less than 300 members. So it works fine.
If your application is going to be used by multiple users over a network, then I would strongly suggest using MS-SQL.
Good luck.
|
|
|
|
|
Nadia Monalisa wrote: Do you think MS Access is a good choice over SQL Server Compact ?
Not really. If you don't plan on using Access itself, then I see no advantage. SQL Server, even the Express version (which is free), seems like the more capable and reliable component. And MDB stuff is bound to cause trouble in a 64-bit environment, so it will not be the long-term way to choose.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hi, Thanks for the reply,
Full blown SQL Server or SQL Server Express cannot be used for my application as my user wont install those. I have only 2 options,
1. SQL Server COMPACT OR
2. MS Access
So, by performance, are you suggesting me to use SQL Server COMPACT ?
|
|
|
|
|
I can't answer that. I suggest you perform a little experiment, just create some code simulating your typical DB operations, fit the right DAL, and observe on a relevantly sized but otherwise fake database.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Nadia Monalisa wrote: So, by performance, are you suggesting me to use SQL Server COMPACT ? I suggest that you measure it's performance, as different machines will display different behaviors. In general, it seems to be suggested that Sql Ce is the faster of the two, with my own testresults[^] listed below;
Microsoft Access (Provider: OleDB)
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\database1.mdb;User Id=admin;Password=;
16377 records 54 seconds, averaging 0.0033 seconds per inserted record.
SQL CE (Provider: SqlCe)
Data Source=C:\MyDatabase1.sdf;
16377 records in 38 seconds, averaging 0.023 seconds per inserted record. Sql Compact does have other limitations, so it's a trade-off between the extra speed, or extra convenience. You can't use stored procedures for one, while Access has the benefit that you can even embed some reports in the datastore.
Don't take a suggestion based on rumors on the internet - make a list of arguments that prove that it's going to be the better choice for your specific scenario.
I are Troll
|
|
|
|
|
Nadia Monalisa wrote: I mean, performance and portability wise.
On average performance is unlikely to be a concern for a single user system. With specific information about the functional needs of your application it might be more relevant.
Reliability on the other hand could be a factor.
Portability is probably meaningless because anything that is going to run .Net is going to be able to run SQL Server.
Presumably there is no intention at all, under no circumstances, where more than one user of the database is required. If so then SQL Server is probably a better choice.
Installation can be made a non-issue by providing an installer that installs everything.
|
|
|
|
|
|
Has anybody ever seen anything like this in the WHERE clause of an SQL SELECT?
WHERE a.somenumericvalue = + @somenumericvalue
I certainly haven't and I don't know what it does. It's kind of difficult to Google for as well so that's why I'm putting it up here. Anyone got any ideas?
|
|
|
|
|
Usually the + sign will have braces around it and appear following the field. Or at least that is how I'm familiar with it. It is for doing an open join on table. Or as I like to think, anything matches on NULL.
where a.ID_Field = b.ID_Field (+)
All rows from table a will be returned.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Yes, I've seen that old join syntax before. It's not what's going on here though. Most strange. I can't even see that it's affecting the logic.
|
|
|
|
|
Would it have anything to do with the bind variable?
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
I can't see how. All this code was ripped out of a ginormous Python framework last year; I'm new on the site. It's possible that this is a concatenation that slipped through, and SQL Server doesn't give a compile error, possibly because it's applying a plus to the bind. Or maybe this is a jury-rigged ABS()? I dunno, but it's queer as folk. I'll ask around tomorrow morning...
|
|
|
|
|
Run the following.
Then replace the '-' with a '+'.
declare @i1 int;
declare @i2 int;
set @i1=1;
set @i2= - @i1;
select @i2;
|
|
|
|
|
Hi
I'm getting error while retrieving only a dataset <100k rows (~150MB estimate) - ran into this error: "Description: Not enough storage is available to complete this operation."
After googling seems like it's related to memory (As supposed to disk space or SQL server)
This is how I instantiate connection and command:
ADOconn.conn = actxserver('ADODB.Connection');
ADOconn.conn.ConnectionString = connStr;
ADOconn.conn.CursorLocation = 2;
ADOconn.conn.ConnectionTimeout = xxx;
ADOconn.conn.CommandTimeout = xxx;
ADOconn.conn.Open;
ADOconn.command = actxserver('ADODB.Command');
ADOconn.command.CommandTimeout = 0;
ADOconn.command.CommandType = 4;
ADOconn.command.ActiveConnection = ADOconn.conn;
Any idea if there's a property on connection or command whereby max memory limit can be set? (And is there a default?)
Thanks
ADO Connection object http://msdn.microsoft.com/en-us/library/ms807027.aspx
ADO Command object http://msdn.microsoft.com/en-us/library/ms675022(v=vs.85).aspx
Microsoft SQL Server connection string http://www.connectionstrings.com/sql-server-2005
dev
|
|
|
|
|
A dataset requires approximately ten times the space of the actual data (give or take a lot).
So if you're running a 32 bit application I would not be surprised if you hit the 2 GB program limit.
Can you use a datareader instead and page the data?
Or store the data more efficiently in a collection instead of a dataset?
|
|
|
|
|
php code to read from the database
|
|
|
|
|
what have you tried so far? which book have you studied? how many CodeProject articles have you read already?
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Your query returns lots of results: http://www.google.com/search?q=php+code+to+read+from+the+database[^]
In order to get good answers you should be able to show that you've already tried to solve things out or built something but perhaps encountered a specific problem which you would like solve with the help from people at discussion forums. One good rule of thumb is that typically the answers are as good as the question.
I'm really confident that if you pinpoint an exact problem you'll receive quality help from the forums.
|
|
|
|
|
Dear All,
Am running an sql query in Access db , 2007 , and it returns the expected reocrds.
Now i copied the same query into a dataset , but it is generating diff numnber of records.
Any body can guide me where should i look to solve this.
Am writing the query in case it helps
SELECT tb_c.c_number, tb_c.c_description, tb_c.c_scope, tb_c.c_category, tb_c.c_type, tb_c.c_scope, tb_c.c_number, tb_e_to_c.total_dc, tb_e_to_c.e_id
FROM tb_c INNER JOIN tb_e_to_c ON tb_c.c_number = tb_e_to_c.c_number
WHERE (((tb_c.c_scope)="Base Scope") AND ((tb_e_to_c.e_id)=1));
And Here how i wrote in the data set (its runing and returning records, which means the syntes is true, but the numer of records are different):
sqls = "SELECT tb_c.c_number, tb_c.c_description, tb_c.c_scope, tb_c.c_category, tb_c.c_type, tb_c.[c_scope], tb_c.[c_number], tb_e_to_c.total_dc, tb_e_to_c.e_id FROM tb_c INNER JOIN tb_e_to_c ON tb_c.c_number = tb_e_to_c.c_number WHERE(((tb_c.[c_scope])= '" & scope & "' AND ((tb_e_to_c.e_id)= " & eid & ")))"
set rcs = db.openrecordset (sqls)
0 will always beats the 1.
|
|
|
|
|
if you set a break point in your code and take a copy of the sqls variable's value and run that directly on the access database.
How many records does it return?
Is the outputted SQL Different to what you are expecting?
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
The variables
scope and eid are in the code are the same as the one run in the access database.
I did one step, that i added one more record to my tables that meets the conditions in the sql statement and run both on database and in the recordset, the sql returns true result (expected i.e: 3 records) and the recordset returns only 1 single record. seems that number of records in the record set is stuck to 1 single record. dont know why
And there is nothing special about this record, i mean its not the first record in the tables. its really weird
0 will always beats the 1.
|
|
|
|