|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
Any alternative to SQLite?
I'm using an MSAccess database which uses a file to stoee all the data. I found SQLite which is using a file as database.
The issue with SQLite is the missing way to protect this database with a password.
That's why I need something similar to SQLite or MSAccess: does anyone know any alternative? What about firebird?
Thanks
modified 5 days ago.
|
|
|
|
|
MS SQL Server Express Edition
|
|
|
|
|
Does MS SQL Server Express Edition create the database in a single file like MSAccess?
modified 5 days ago.
|
|
|
|
|
|
Can I copy those two files in a different PC or directory in order to continue to use it?
My idea is creating the database in PC A and move those files in a dedicated directory of PC B
|
|
|
|
|
Probably.
However, the best way would be to backup the DB on the PC A and then restore it on PC B.
|
|
|
|
|
|
What's the syntax error in the following TSQL stored procedure call?
EXEC StoredProcedureName 9,'723147504','1',CONVERT(DATETIME, '09-27-2024 14:14:28'),'calculated','','','',0,0,0,0,0,0,0,0; SSMS is telling me "Syntax error near keyword CONVERT"
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I typed it in as a Select and it worked fine. Changing it to and EXEC proc failed. Try converting the date then see.
DECLARE @DateT DateTime = Convert(DateTime, '09-09-2024 14:14:28')
EXEC StoredProcName 9,'12341239487','1', @DateT,'calculated','','','',0,0,0,0,0,0,0,0,0;
This works fine for me. Raiserror is the same way, can't cast or convert inline.
Jack of all trades, master of none, though often times better than master of one.
|
|
|
|
|
Thanks, Ron. I guess it's not a huge problem, but it is annoying!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
If the parameter is typed as datetime , you shouldn't need to explicitly convert the string literal when you pass it in.
However, it would probably be best to use the unambiguous date format (yyyyMMdd ):
EXEC StoredProcedureName 9, '723147504', '1', '20240927 14:14:28', 'calculated', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I'll give this a try when I'm back in my office.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
If I give read-only access to a SQL Server login, does that mean they cannot call stored procedures that CRUD data?
What I'm looking for is the ability for users to:
1. Read the database,
2. Execute stored procedures that CRUD data.
But NOT run any DDL. Meaning they cannot change table structures or stored procedures.
I'm sure there must be a way to configure this.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
So long as the user has permission to execute the stored procedure, and the stored procedure and the tables it references have the same owner, then it will work even if the user doesn't have any permissions on the referenced tables.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks, Richard!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Attempting to recover from the Azure disaster I downloaded the developer and then the express versions of SQL Server 22. Both failed to install because of a missing/incorrect msoledbsql. I then downloaded the dll and installed it before attempting to reinstall, it still failed on the same issue.
I tried the same with 2019 version with the same issue.
Any suggestions as to how to get around the problem?
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
|
Excellent - that resolved the issue, thanks. Now any chance you can shake a person out of Azure
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I have discovered that in T-SQL for Sql Server 2022, if I run a stored procedure that happens to call another stored procedure that returns a result set, then the server returns both result sets to my application.
How can I, within T-SQL, specify that the result set of an embedded stored procedure call is not part of the return to the client? Is there a way to specifically choose?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
For a single resultset, you may be able to use INSERT .. EXEC to dump the resultset into a temporary table / table variable.
DECLARE @tmp TABLE ( ... );
INSERT INTO @tmp EXEC yourStoredProcedure ...; But if you control the other stored procedure, a cleaner option would be to add another parameter to suppress the output.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks, Richard. I'm frankly surprised that there's no documented way to return only specific result sets. I'll probably end up using the additional parameter to suppress output.
Cheers.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Is there any tool/solution to export the tables and then data from SQL Server to SQLite?
|
|
|
|