Databases

54K

Solutions

74

Articles & Videos

38K

Contributors

Databases are organized collections of data, most commonly accessed through management systems including schemas, tables, queries and processes that allow users to enter and manipulate the information or utilize it in other fashions, such as with web applications or for reporting purposes.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am new to entity framework, Whilst i love it, there are still some things i cant figure out. I have good experience with SQL and in SQL this is a easy task.

I have attached a copy of the db tables and their relationships. Hopefully someone can help.

I need to see all items in the orderitems table which have a corresponding statusid of 100 in the orders table.
from that list i then need to see all items in the orderitems table grouped by the store in which they belong.

Any help is appreciated :)
Model.PNG
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

On my asp.net mvc view page I have textbox like this.

The EventTime field is a DateTime datatype in the database.
I'm using the Entity Framework Database First approach.

On the web browser i'm displaying it like this:  09:00 AM

@Html.TextBoxFor(model => model.EventTime, "{0:hh:mm tt}", new { @class = "form-control", id = "EventTime" })
@Html.ValidationMessageFor(model => model.EventTime)

But the validation is saying "The field EventTime must be a date."


Any ideas of how to fix this?
0
I'm working on an ad campaign management app. There's a feature there advertisers can assign caps for campaign based on spending or conversions in daily, monthly or lifetime basis and there would be multiple caps per ad campaign. As soon as one campaign reaches the 80% we will send notification to all publishes and once caps are reached we have to stop the campaign immediately. We're receiving thousands of event per second. Currently what i'm doing is querying reporting table every second but it's quite inefficient and sometimes campaigns already exceeded the caps when I detect it. So my question is;

What're the existing efficient programmatic or architectural solution's in industry to handle these kind of situations?
0
I'm running into the below error when using the OLE DB (ADO) SQL Server Native Client 10. Server is running SQL Server 2008 R2. We are able to make a connection using Microsoft OLE DB Provider for SQL Server fine however the reports are putting out unreadable data. Thanks in advance.
Crystal reports error
0
I need to document a a MySQL database.  Is there a tool that can scan the DB and detail out tables, etc.?
0
For Microsoft SQL, 2012, I was told that the following, ""Database encryption scan" indicates that  a database is being created.  A quick google search is pulling up information that suggests otherwise.  I am looking for something definitive.   I am working with others to be alerted when a database is created and another when the database is encrypted.
0
Is there a way for me to track which user makes a change to a record in an Access database? For example, if a field is changed from one selection to another, how would I record the user and the timestamp when the change is made? We don't sign into the database so there's no prior authentication before using it (access comes via active directory permissions). We are on Office365 subscriptions so the apps are integrated with our accounts but I don't see anywhere I can capture that info.
0
Hi ,

SQL> /

COMP_ID    COMP_NAME                      VERSION                        STATUS
---------- ------------------------------ ------------------------------ --------------------------------------------
DV         Oracle Database Vault          11.2.0.3.0                     INVALID
OLS        Oracle Label Security          11.2.0.3.0                     VALID
XDB        Oracle XML Database            11.2.0.3.0                     VALID
OWM        Oracle Workspace Manager       11.2.0.3.0                     VALID
CATALOG    Oracle Database Catalog Views  11.2.0.3.0                     VALID
CATPROC    Oracle Database Packages and T 11.2.0.3.0                     VALID
           ypes


How do i make my vault component to valid state . I tried with multiple options .

OS - Solaris

Thanks,
VInay Palaparthy
0
Hi - I'm trying to sum the amount in a report that is Grouped by Orders, the group will show Capital and Expense orders.  Trying to show separate total amounts for Capital and Expense orders in the Report Header.  

I'm using a text field with    =Sum((SELECT [Amount] WHERE [OrderType] = "Capital")) but getting an #Error


Thanks
Bob
0
I am working on visual studio 2012. i want to know how to attach fingerprint scanner with windows form application that it scan image from the the scanner and show that impression in the window form moreover that image compare with the image stored in the database against that information that the user entered in the window form .Please reply me as urgent as you can I need the code badly
0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

How would i upload and retrieve multiple images/files of an individual in a database. for example one can upload five (5)  images/files to MR. A and 3 Images/files to Mr. B and then how would i retrieve the Images/files individually using the Mr. A or Mr. B ID as Key Using Userform in Excel VBA
0
I'm following along with a video by Ben-Gan called Creative Uses of Apply Operator and he shows this code

Select orderiid, orderdate, nextyear
from sales.order
  cross apply(values(year(orderdate))) as a1(orderyear)
    cross apply(values(year(orderyear +))) as a2(nextyear)
where orderyear > 2007

---end code----

He comes up with a result set where the nextyear column is one year later than the orderdate, i.e., if orderdate is 2008-01-01, nextyear is 2009
you can see it video place...

 https://youtu.be/-m426WYclz8?t=1291

However when I try using it with this code on two different databases 2012 AdventureWorks or AdventureworksLT  I use the same code on different column names..


select SalesOrderID,  OrderDate, NextOrderYear
from SalesLT.SalesOrderHeader
      cross apply (values(year(OrderDate))) as a1(orderYear)
            cross apply (values(year(orderYear + 1))) as a2(NextOrderYear)
            where orderYear > 2001

I get the

 NextOrderYear as being 1905

Obviously something is not right. Just not sure what?
0
Hi everyone ,

I applied CU 15 on my exchnage 2013 mailbox server,but got an error on step 12 ,below is the full error ,should i consider this update as complete or i will have to run the setup again.

when i run below command to chekc the CU version

Get-ExchangeServer | Format-List Name, Edition, AdminDisplayVersion

it shows the serevr has latest CU version on which i got the error

Error:
The following error was generated when "$error.Clear();
          $name = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxUniqueName;
          $dispname = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxDisplayName;
          $dismbx = get-mailbox -Filter {name -eq $name} -IgnoreDefaultScope -resultSize 1;
          if( $dismbx -ne $null)
          {
          $srvname = $dismbx.ServerName;
          if( $dismbx.Database -ne $null -and $RoleFqdnOrName -like "$srvname.*" )
          {
          Write-ExchangeSetupLog -info "Setup DiscoverySearchMailbox Permission.";
          $mountedMdb = get-mailboxdatabase $dismbx.Database -status | where { $_.Mounted -eq $true };
          if( $mountedMdb -eq $null )
          {
          Write-ExchangeSetupLog -info "Mounting database before stamp DiscoverySearchMailbox Permission...";
          mount-database $dismbx.Database;
          }

          $mountedMdb = get-mailboxdatabase $dismbx.Database -status | where { $_.Mounted -eq $true };
          if( …
0
hi i got the following report where i add two column to summary the total of two column
1 after i edit the report am now geting more page than original report
2 the report is showing wrong total
beforeedit.jpg
afteredit.jpg
0
I was thinking maybe Northwinds DB but there may be better. Any thoughts or links appreciated.
0
Hi Experts,

I am noticing that by exchange backups are using a lot of space. I am runnig a DAG with two CAS and two DB servers.  I am backing up the DB servers using the VEEAM Backup application.

What is the best\recommended way to backup my exchange DBs on the DB servers? I made four smaller databases on the DB servers.

Can just backup the active databases  (4)  on the DB servers or do I have to backup entire DB servers?


Thanks
0
I have Crystal Reports 7 (mr2). Its circa 2000 but is functional and fast, and it is used to support another program that is circa mid-80s. I add this point because there really is not a modern alternative and I am stuck with the 80's program.

I eventually coerced Crystal to run on Windows 7(64), to get away from the Windows XP box it is running on. It appears to work but for one problem. When running a report as an AD domain user the report fails with: "PEStartPrintJob : Error detected by database DLL." But if I log off and back on as the local Administrator, the report completes successfully.

The other point I would mention but might be nothing is that the startup file: "Seagate Info Startup" which launches: Sentinel, APS, Agent, and Analysis Server also fails to launch those programs as an AD user. I can launch the program manually and then it runs. Again its different behaviour as local Admin. The file launches from the StartMenu startup folder without a manual nudge.

Been scratching my head for the last 12+ hours or so. I doubt anyone out there is still using this antique but on the off-chance someone is, what's the trick? why doesn't CR7 like domain users?
0
I need to copy a table from the main Access database and insert it into another database that is located in a different folder. I am programming in VB.Net. Below is the code I am trying. It gives me an error message at the "cmd.ExecuteNonQuery()" statement.

The error says:  {"Query input must contain at least one table or query."}. I have a database at the external folder location called AssetDatabase.accdb into which I want the table copied. What am I doing in correctly? Is the syntax wrong?

cmd = New OleDbCommand("Select * INTO  [tblAssetData-" & CompanyName & "] IN C:\Users\rkvjr\Documents\Backup\AssetDatabase.accdb FROM tblAssetData", objcon.con)
cmd.ExecuteNonQuery()
 

Open in new window

0
i have an scenario where i have to compare  live data from the database to the data in the customer file that we get every night and send only the changes between the two.

i am trying to create a join in LINQ where i need to join two columns, customer and status to that of the file.
if its the same customer and same status but all the other columns are different then write it as changed customer but if its the same customer and different status then i would like to update that customer record to a 4 which means removed customer. this is my linq code i am not sure how to do a join on multiple columns and how to do an update.

i would like to join customers and status on the below code

     DataTable tblSamebutotherchanges = (from r in FirstDataTable.AsEnumerable() 
                                                join s in SecondDataTable.AsEnumerable()
                                                on r.Field<string>("Customer") equals s.Field<string>("Customer")
                                                where r.Field<string>("STATUS").Trim() == s.Field<string>("STATUS").Trim() || r.Field<string>("Name").Trim() != s.Field<string>("Name").Trim() || r.Field<string>("ADDRESS").ToUpper().Trim() != s.Field<string>("ADDRESS").ToUpper().Trim() || r.Field<string>("ADDRESS 2").Trim() != s.Field<string>("ADDRESS 2").Trim() || r.Field<string>("CITY").ToUpper().Trim() != s.Field<string>("CITY").ToUpper().Trim() || r.Field<string>("STATE").Trim() != 

Open in new window

0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Our database lists loan officers by  a number. I would like to write a crystal report and instead of having a number show up for each loan officer  I  would like to see their name instead


Example Bob Smith is loan officer 01

When I look at the report I see 01 for all the loans Bob sold

instead of seeing 01 come up I would like to see the name Bob Smith

Can you point me in the right direction
0
With the following code in place:

 <?php echo $form->dropDownListRow($model, 'specialty_id', DoctorSpecialty::listOptions()); ?>

How would I limit the possible choices to just two of four?  I can't delete the other two from the table because they are used in the database in other places.
0
I have a scan Operator Database where the scan operator saves details such as the main scan folder for that day, it's subfolders and the files withing those subfolders (All in 1 to many relationships).

On the form f_Batch_Scans, the scan operator fills in some details about that scan batch (Operator name, date, etc) and then clicks on the black command button to insert the Main Batch Scan folder. This folder name is written into t_Batch_Scans. The next step is to click on the next black button "Click here to list the subfolders".

I am trying to add the related subfolders to the subform, however, I cannot get the table to update, and the debug either fails on rst.AddNew or .rst.Update.

I can see the correct values for SubDir exist in the immediate window, but cannot for the life of me get the subfolders table to update...

Attached is the database if you wish to have a look at it.

Thank you for your help with this !

Bill
Scan-Operator-v-1--2-.zip
0
Using Office 2016 64bit with 64bit ODBC DSN and using a access 2016 database to pull MS queries from text file to excel.

If the query file is stored anywhere on local PC >>>>> it works.
If the query is stored on network location and its accessed via UNC path >>>>> it works.
If the query is stored on network location and its accessed via "Mapped network drive" >>>>> not working.

Error:
The text file specification 'xxx' does not exist.

Error in attached file.
X64-ODBC-query-error.jpg
0
If I have names in a database that are found when users go to a page to search for names in my database - how can I get Google to also search the database for the same names - so they can show up in a Google search?

Pages re in PHP and data is in MySQL.

Or is it not possible?
0
CREATE OR REPLACE TRIGGER example_trigger
AFTER INSERT ON db.emp_tbl
FOR EACH ROW
WHEN (new.EMP_ID='001')
BEGIN
        INSERT INTO db.emp_tbl (EMP_INSTN_ID,EMP_ID,FMT_EMP_ID,MOD_COUNT) VALUES (:new.EMP_INSTN_ID,'TEST','TEST',0);
END;

Trigger created successfully. But while inserting record it giving following error

SQL> INSERT INTO db. emp_tbl (EMP_INSTN_ID,EMP_ID,FMT_EMP_ID,MOD_COUNT) VALUES ('ATEST','Example','Example',0);
TBR-15095: Trigger/function cannot access table '' while it is being modified.
TBR-15163: Unhandled exception at DB.EXAMPLE_TRIGGER,  line 6.
0

Databases

54K

Solutions

74

Articles & Videos

38K

Contributors

Databases are organized collections of data, most commonly accessed through management systems including schemas, tables, queries and processes that allow users to enter and manipulate the information or utilize it in other fashions, such as with web applications or for reporting purposes.