Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all 13329 articles
Browse latest View live

Adding a new record with some criteria filled in and popup

$
0
0
Hi everyone. This should be easy. I’m just not as advanced as I’d like to be. I have an Access database that I use to track items for an auction. My table ITEMS tracks the auction items in addition to who won an item and the amount they paid for it and the ATTENDEES table tracks each registered guest. At checkout, I have a form that displays a person’s name and shows the total they owe and how they pay. There are buttons that can show the receipt and print the receipt.

I’d like to have a button that can add a generic item to the end of Items table with and ItemName of “Cash Donation” where you get a popup to fill in an amount which gets entered as the ItemFinal Price and assigns the AttNumber (attendee number who purchased it) to the same person whose information you were viewing on the checkout form.
In my Items table, ItemNumber is my primary key.

I appreciate any help. Thanks.

access 2010

$
0
0
some guidance please on these lines

UPDATE tableName SET (columns to NULL) WHERE fieldnames LIKE '*Ledger#'

The number of columns that need to be set to null exceed the number permitted
so if there were a way to iterate/loop through the columns to find all
those starting with the name Ledger

Appreciate any help


Regards
Peter

Combo Box problem

$
0
0
Hi everyone!

I do not know what I am doing wrong with the VB Code. When I select a value in my Combo Box, I must see related information in the sub form below the Combo Box. Can anyone look at it and solve it for me.

You can find attached MS Access 2007 file which is compressed with 7zip. Just change the extension of the file to .7z in order to be able to open the file.

The VB Code I used is as following:

Option Compare Database

Sub SetFilter()

Dim LSQL As String

LSQL = "select * from Customer"
LSQL = LSQL & " where Name = '" & Combo2 & "'"

Form_Customer_Sub.RecordSource = LSQL

End Sub


Private Sub Combo2_AfterUpdate()
SetFilter
End Sub

Private Sub Form_Open(Cancel As Integer)
SetFilter
End Sub

Thanks in advance for your help.

Manan

Attached Files
File Type: zip Database21 - Copy.zip (16.7 KB)

Combo box limited by another

$
0
0
I have three combo boxes - SkillList, SubSkillList, SubSkillList2 (I'll call them 1, 2, and 3.) 2 is successfully limited by the value in 1 - It works fine. I need to limit 3 by the value selected in 2... can't get there. When value is selected in 2, access returns the text value associated with 2 in an input box waiting for a response. Can someone see what I'm doing wrong?? Much Appreciated!!

David -


Private Sub SkillList_AfterUpdate()
With Me![SubSkillList]
If IsNull(Me!SkillList) Then
.RowSource = ""
Else
.RowSource = "SELECT [SubSkill] " & _
"FROM SubSkillList " & _
"WHERE [SkillID]=" & Me!SkillList
End If
Call .Requery
End With


End Sub

Private Sub subSkillList_AfterUpdate()
With Me![SubSkillList2]
If IsNull(Me!SubSkillList) Then
.RowSource = ""
Else
.RowSource = "SELECT [SubSkill2] " & _
"FROM SubSkillList2 " & _
"WHERE [subSkillID]=" & Me!SubSkillList
End If
Call .Requery
End With


End Sub

Is it possible to 'Comment Out' lines of script?

$
0
0
I have some scripting that currently works but would like to try to modify some individual lines. In the past, I simply saved my program with a different name, modified the lines of script in question, and evaluated the results... at that point I either delete the original program or the newly named one depending on the results. This approach is certainly less than ideal and it would be GREAT if i was able to 'comment out' the lines of code so that I have the original scripting and the test script within a single program.

Within Visual Basic, only a single quote (') was required to do this and it was easy and quick to test changes to coding. Is it possible to 'comment out' lines of script in Brilliant Database?

sqlplus refuses to authenticate

$
0
0
Hi, my sqwl plus from oracle 11.2.0.4-win-x64 instance refuses to run:

Code:

C:\>sqlplus "/as SYSDBA"

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 15 22:10:39 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name: sqldba
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied

What's wrong?

Question on Count

$
0
0
I have a table and when I run a count againt it it returns a count of 51762 records. When the table is viewed in MySQL Workbench I see that the key value is a biblioitemnumber which is incremented. In some spots, the biblioitemnumber skips (i.e. a record will show 31445 as the biblioitemnumber and then the next record will show 31450).

I made a new table and inserted records in it from the old table using the biblioitemnumber which was incremented up to 51,513 in the old table. A count of this table gives me 35000 records.

What I am trying to understand is why the count show 51762 on the old table and only 35000 on the new table. I painfully counted the records in the GUI manually.

I vaguely remember that a record is not actually deleted when deleted but is only marked not to be shown. Is this the reason I'm seing a count of 51762 records but only 35000 actual records.?

MySQL database is on Ubuntu.

Thanks for any information becaused I'm certainly confused in Montana.
:shocked:

Start and end dates from week number

$
0
0
Hi All

I have a weekly report that I use a week number to query the data. I want to put the Start and end date on the report. Is there and easy way to extract this from the week number.

Thanks In Advance

Bob

ASE 12.5 sql

$
0
0
Hello

Please can you help me with a batch file script to automatically create database & devices on an ASE 12.5 server ?

Thanks
Res

Setting a Parameter Query in VB code

$
0
0
Hello,

I currently have some code that runs a query and sends an email via outlook from that query. However I want to be able to set a parameter in the query, i have read online that you need to set the parameter in the Visual Basic code as well but i literally have no idea how and what i read online seem quite confusing!

This is the code i have at the moment:

Code:

Private Sub Command80_Click()
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim sToName As String
Dim sSubject As String
Dim sMessageBody As String

 
Set MyDb = CurrentDb()
Set rsEmail = MyDb.OpenRecordset("qry_InductionLetter", dbOpenSnapshot)
 
With rsEmail
        .MoveFirst
        Do Until rsEmail.EOF
            If IsNull(.Fields(6)) = False Then
                sToName = .Fields(6)
                sSubject = "Invite to World of Work Induction Course:  " & .Fields(10)
                sMessageBody = "Dear " & .Fields(0) & " " & .Fields(1) & "," & vbCrLf & vbCrLf & _
                "Thanks," & .Fields(11) & vbCrLf
               
 
 DoCmd.SendObject acSendNoObject, , , _
                    sToName, , , sSubject, sMessageBody, False, False

            End If
            .MoveNext
        Loop
End With
 
Set MyDb = Nothing
Set rsEmail = Nothing
End Sub

This sends an induction letter to the candidtates in the qry_InductionLetter. At the moment the query brings back everyone was is eligible for the Induction even if they have already attended, so for my parameter i need the user to choose which course they want to attend as i dont want letters to be sent out to the same candidates each time.

Thanks for any help in advanced!

How to display the output of a procedure which is being called by another procedure

$
0
0
Hi,

I have a procedure(proc1) which does some insert operations and at last calls another procedure(proc2). Proc2 has a select statement which is declared in a cursor with return for. Now when I call proc1 I want it to do all the inserts which is specified in its block and display the result fetched by proc2 which is internally called by proc1.


How can I do that??

I have created both the procedures and they are working fine. When I call Proc1 it simply writes executed successfully and the when I check in the table the data is inserted but how can the data fetched by the select statement in proc2 be dislpayed when I call proc1??

Here are the procedures

PROC1 :

CREATE OR REPLACE PROCEDURE ACHINST1.ReportD010 ( IN MISDATE date, IN start_date DATE, IN end_date DATE, IN sender_name varchar (50) )
SPECIFIC ReportD010
LANGUAGE SQL
NOT DETERMINISTIC
EXTERNAL ACTION
MODIFIES SQL DATA
OLD SAVEPOINT LEVEL
begin

declare increment_date date;
declare last_date date;
declare expairy_date date;
if (start_date is null and end_date is null)
then
set increment_date = misdate;
set last_date = misdate;
else
set increment_date = start_date;
set last_date = end_date;
end if;
Repeat
set expairy_date = achinst1.aging (increment_date, (select valuestring from achinst1.systemparameter where sp_key = 'NO_DAYS_CONSIDERED_AS_ACCEPTED'));
insert into achinst1.tat_table values (increment_date, expairy_date);
set increment_date = increment_date + 1 days;
until (increment_date > last_date)
end repeat;
call achinst1.test (misdate,start_date,end_date, sender_name);
end;

PROC2:

CREATE OR REPLACE PROCEDURE ACHINST1.test ( IN MISDATE date, IN start_date DATE, IN end_date DATE, sender_name varchar (50) )
SPECIFIC test
LANGUAGE SQL
NOT DETERMINISTIC
EXTERNAL ACTION
MODIFIES SQL DATA
OLD SAVEPOINT LEVEL
begin

DECLARE C1 CURSOR WITH RETURN FOR

select * from (
SELECT COALESCE(MISDATE,START_DATE,to_date('01-'||month(current date)||'-'||year(current date),'DD-MM-YYYY')) as START_DATE,
COALESCE(MISDATE,END_DATE,LAST_DAY(current date)) as END_DATE,d.disputekey ,d.creationdate ,t.expairy_date,date(max(a1.timestamp)) as businessdate, p.name as SENDERNAME,p1.name as RECEIVERNAME,d.trandate,
d.tranrefnumber,a.amount,(case when d.disputetype = '1' then 'Initial Dispute'
when d.disputetype = '2' then 'Pre-Arbitration Dispute'
when d.disputetype = '3' then 'Good Faith Dispute'

end ) as disputeType,d.disputestatus from achinst1.dm_dispute as d
inner join achinst1.achiteminfo as a on a.id = d.DISPUTEDACHITEM_ID
inner join achinst1.participant as p on SENDERPARTICIPANT_ID = p.id
inner join achinst1.participant as p1 on RECEIVERPARTICIPANT_ID = p1.id
left outer join ACHINST1.AUDITENTRY as a1 on a1.OBJECTID=d.id
left outer join achinst1.tat_table as T on d.creationdate = T.current_date
where d.disputestatus='REJECT'
group by d.disputekey,d.creationdate,t.expairy_date,p.name ,p1.name,d.trandate,
d.tranrefnumber,a.amount,d.disputestatus ,case when d.disputetype = '1' then 'Initial Dispute'
when d.disputetype = '2' then 'Pre-Arbitration Dispute'
when d.disputetype = '3' then 'Good Faith Dispute'
end
order by date(max(a1.timestamp)),d.creationdate,p.name,p1.n ame,d.disputekey

)
where businessdate between coalesce(MISDATE,START_DATE,to_date('01-'||month(current date)||'-'||year(current date),'DD-MM-YYYY'))
and coalesce(MISDATE,END_DATE,LAST_DAY(current date)) and SENDERNAME like nvl(SENDER_NAME,'%') ;

open C1;
delete from achinst1.tat_table;
end;

how to make registration page in oracle

$
0
0
Hi Guys,

how to make registration page in oracle, please write code and logic.

Access to View Excel Charts

$
0
0
Hey Guys,

I have a pretty unique question for ya. I have a large excel file (~80mb) that contains some seasonality charts for 8000+ items. Because saving a chart for each item would make the file insanely large, we have macros that allow you to type in an item number, and it will build the chart instantly, all on the same page.

I would like to incorporate this into access. However, here is what I have found:

1: Access charts are very basic -- like Windows 95
2: Using the unbound object frame did not allow me to do everything I wanted.

So here is the question:

Is it possible to somehow have a 'shell' of excel where when you open up a forum, it downloads the excel file and allows you to control it?

The objective here is to look at the chart, and then make a recommendation using a form in access. Because many of my end users do not have multiple screens, it would be nice to keep it all on the same page and not have to click back and fourth.

Any ideas?

DB2 For the MSSQL DBA

$
0
0
Hello All,

Can any one recommend any good books for converting a vast amount of Microsoft SQL Server DBA knowledge into the basics of DB2 DBA?

Make tab on sheet change color to notify open items

$
0
0
Hi everyone. I was trying to see if this could be done. In a workbook I have a column for open questions. What I would like to maybe do is where there are open questions have the Tab on the sheet show a certain color or perhaps show the word "OPEN" on it. That way we won't have to go through the workbook to see if there are any open questions remaining? This is in Excel 2010.

Thanks to any info on this and Happy(belated) Father's Day to any fathers on here.

Bud

CDC issue

$
0
0
Hi ,

We are getting this warning frequently in CDC events (single scrape) , can you please help to fix this issue

The error value is "Progress operation with commit position 539f37ec000000000000 was created before a commit with the older commit position 539f37eb000000060000".

SQL Server Option

$
0
0
Hello - I'm beginning development on a software application which will be expected to grow very large and require performance suitable for a modern web application.

Previously Ive only created SQL server databases running on a single machine.

Based on my reading it appears I will have to design the architecture (Translate) to suit the application - from here: Scaling Out SQL Server

Are there any Tips that could be useful? I.e. I Know with my application cache I can build it to be easily updated to run using a Distributed Cache when the time comes.

Should I start with a SQL Business instance on Azure and construct the database in a particular way from start?

Any tips, information would be appreciated

grants for loadjava

$
0
0
Hello !

I have tried to import the classes of Apachee PDFBox into Oracle11.

With the loadjava command and user sys this works as espected.

1. loadjava pdfbox-app-1.8.2.jar -recursivejars -verbose
2. loadjava pdfbox-app-1.8.2.jar -recursivejars -verbose -resolveonly

However If I try to import the classes into another schema user, some classes are not resolved and stays invalid with ora-29534.

So what kind of grants are necessary to import all classes?

I have tried so far without success:

grant JAVA_ADMIN to SCOTT
grant JAVASYSPRIV to SCOTT
grant JAVADEBUGPRIV to SCOTT
grant SYSDBA to SCOTT


Thanks in advance
Volker

Bgwriter stat results abnormal?

$
0
0
Hi,
I have a fairly heavily loaded DB that has been facing performance problems with disk IO lately. Have been trying to tune the DB using various parameters, but seems like the write load is still very high. I got the following results from running the select on pg_stat_bgwriter, and am wondering if it is abnormal?

select * from pg_stat_bgwriter;

checkpoints_timed checkpoints_req buffers_checkpoint buffers_clean maxwritten_clean buffers_backend buffers_alloc
7829 39 12538586 1398590

12501 715426 40053158

Seen some literature that the numbers should be lower, but am wondering what I should be seeing for this.

Thanks,

SSRS Chart Series Max value in Chart Title

$
0
0
Good day,

I have a chart that calculates and displays the weekly percentages for an item as well as the full details there of below.

What I want to do is in the Chart Title display the maximum Percentage for the time frame in title of the chart. So say there is week 1, 2 and 3.

Week 1 value of 3.1, week 2 there was no data is effectively is nothing, and week4 is 4.01, I want 4.01 displayed in the title of the chart.

Can someone help me with this please?

I have been trying to for 3 days and still no luck.
Viewing all 13329 articles
Browse latest View live