查找

Question
· Fév 18

Using a SQL Server stored procedure in a CSP page

Hi Community, 

I have a problem I am hoping someone can help with - I have created a front-end with HTML/CSS/JS in a CSP page in Iris Studio. I am trying to use objectscript on the back end to connect to a SQL Server Database (with valid credentials), and execute a stored procedure.

I have a fileList variable that is a stored as a comma separated string through a user input textBoxContainer. This is to be used as a parameter in the stored procedure called @Docs

When I run the stored procedure from SSMS and enter the fileList manually on executing, it runs as expected, however when I run from the CSP Page, it doesn't execute. I have put the code snippet below in hopes someone has done this before and can provide an example. For an example fileList, you can assume - fileList = "111,222,333"

 set gc=##class(%SQLGatewayConnection).%New()

set CredentialObj=##Class(Ens.Config.Credentials).%OpenId("DatabaseCred")

 Set pDSN="DB-DSN"

set sc=gc.Connect(Assume DSN and User&Pass Credentials Here,0)

  If $$$ISERR(sc) {
  &js< alert(#(..QuoteJS("DB connection Failed: ", $system.Status.GetErrorText(sc)))#);>
  Quit
  else {
  &js< alert(#(..QuoteJS("Connected To DB"))#);>
  }

 If sc '= 1 {
       &js< alert(#(..QuoteJS("Error executing stored procedure: ", gc.%SQLCODE))#);>
       
    ElseIf scriptName = "procedure1" {
        Set sc = gc.Execute("EXEC ExternalDB.DB.StoredProcName @Docs = ?", fileList)

}

 

Thank in advance. Also, just in case this is relevant, the stored procedure is in one DB and updates the data on a different DB, however, I don't think it would be an issue as it connects to DB as expected from the CSP page, it is just the SP that doesn't work.

Kind Regards,

Dan

1 Comment
Discussion (1)2
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· Fév 18

[Vídeo] FHIR Repository e FHIR SQL Builder

Olá Comunidade, 

Aproveite o novo vídeo do InterSystems Developers YouTube:

⏯ FHIR Repository and FHIR SQL Builder @ Global Summit 2024

Descubra os desafios que o Ministério da Saúde de Israel enfrentou ao implantar o InterSystems FHIR Server e o FHIR SQL Builder para diversas iniciativas nacionais importantes.
 

🗣 Apresentador: @Keren Skubach, Senior Sales Engineer, InterSystems

Expanda seus horizontes conosco — assista, aprenda e assine para mais! 👍

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· Fév 18

Apache server .../temp/ does not exist, limiting Gateway functionality

I am using an Apache webserver on RH8, which is working fine. However, I get the following message:

Directory /opt/webgateway/conf/temp/ does not exist or has incorrect permissions. This will limit the Web Gateway's functionality.

The folder is indeed missing, but in what way is it limiting functionality?

3 Comments
Discussion (3)2
Connectez-vous ou inscrivez-vous pour continuer
Article
· Fév 18 4m de lecture

How to shoot a good video for the article contest bonus - Part 2 How to film yourself

Hello Community:

Do you want to know how to record yourself without looking like you're speaking from a cave? Are you one of those who say you ‘don't come off well on camera’? 

Today I'm going to share with you some specific tips that I learned after several years of filming interviews for television and networks. I remind you that these are tips in case you are thinking of taking advantage of the Article Contest video bonus. However, they are tips that I'm sure you can use for presenting webinars, video calls and filming yourself in general.

WHY ADD YOUR CAMERA TO THE TUTORIAL

It doesn't have to be during the whole video, but people like to see faces. It humanises us. There are numerous studies that talk about the positive impact of smiles, eyes and how much they influence the communication of a message. When a face tells us something, we pay more attention, we remember better and we understand better what we are being told.

As this is a tutorial, it is not necessary for it to appear at all times, perhaps at the beginning and at the end; but we will deal with that in the next article. 

LIGHT IS YOUR FRIEND

Whether you have a thousand euro camera, or a webcam that you got with the cereal, they will always work better with natural light. Try to rely on natural light. Even more so if you have a blind that filters the light. Light can be hard (direct sunlight) or soft (when filtered by clouds). Soft light gives a cleaner feel, creates fewer shadows and will evenly illuminate your face.

The first time I went to shoot an interview on my own, I was very lucky. The day was a bit cloudy, we were indoors and we were right next to the window. The make-up of the person to be filmed shone brilliantly and it was a very clean image. Try to take advantage of natural light when filming... but be careful not to get hard light directly in your eyes. It will make you wink your eyes like a beach patrolman looking for sharks.

Tip for the pros: if you're filming at night and you have a powerful spotlight shining in your face like the influencers do, try to create a scene with several points of light. Look for a corner (you will now read the next point) and put a small lamp in the background. That is to say: you have your face well lit and then in the background a small point of light coming from a lamp. This is called backlighting. It serves to separate the subject from the background. This is for the pros, for those who want to do it basic, just try to light your face with a main light that is not too hard, and if it is natural, the better. 

HOW TO FIND A GOOD FRAME

Here we could talk about different concepts that you may be familiar with. Tilt of the camera, air (empty space around the subject in a video), depth...

I recommend you to keep it simple.

Use a tripod/stand. Put the camera at eye level. Don't go super crazy at this point. Try to be centred, so that there is a more or less balanced air on the sides (not too far to the right or left, although obviously you will be moving as you speak). 

But above all, try to keep it clean. There should not be too much noise or distractions (for example, a bookshelf at the back full of cables or unplaced books). A background is fine, it doesn't have to be a white background. Here's what my ‘instructor’ used to tell me when I was filming interviews:

We used to shoot every day in a spot, so he always told me: "look for a natural light source and then try to place the subject with a corner in the background." The corner gives depth, but be careful that whatever is behind is discreet. It's in the background (we even used to blur it). This way we found the best set within a room.  

A good framing should be clean, balanced. This gives a sense of professionalism. Please, horizons must be straight! The first thing I see in a professional photo is to have a non-straight horizon. Of course photographers use diagonal framing on occasion, but it is very noticeable when it is an intended resource and when the camera is simply crooked because we have used the first thing we have found to hold it. 

TAKE CARE OF THE SHOT

A piece of advice: try not to let extraneous elements appear. Don't let things get in the background, don't let the desk be cluttered, etc. I'm sure you had this tip in mind.

SOUND

It's hard to believe, but this is important. You don't need to have a studio recording mastered by a professional. Just keep it in mind and don't put the washing machine on at the same time. Yes, I have had problems with sound pick-up on recordings, and it is very annoying. It has been my responsibility and I say to you: it is better to re-record at the moment than to hope that it will not be noticed in the editing. 

THE LOOK

In a tutorial we look at the camera, but not in an interview. Obviously if you record yourself doing the process live, you will be directing your gaze at the screen, but at some point (especially at the beginning and at the end) look at the camera.

Funfact: in interviews you don't look at the camera. Normally you look at the editor, sitting just to one side of the camera. 

One last piece of advice: practice scripting. Have a mental outline. You don't need to repeat or read word for word, it doesn't come naturally. Just an outline of what you are going to say. 

These are just tips. I'm sure your creativity or needs will make you adapt to your situation. That's wonderful. I hope you find them useful and soon you will have the (I think) last tutorial: short tips for good editing. 

THANK YOU! For reading me. I love reading you (and a special greeting to the English community, good luck in your contest).

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Article
· Fév 18 4m de lecture

Cómo grabar un buen vídeo para el concurso de artículos - Parte 2 Cómo grabarte

Hola Comunidad:

¿Queréis saber cómo grabaros sin que parezca que habláis desde una cueva? ¿Sois de los que decís que "no salís bien en cámara"? 

Hoy voy a compartiros algunos consejos concretos que aprendí después de grabar varios años entrevistas para televisión y redes. Os recuerdo que son consejos por si estáis pensando aprovecharos del bonus de vídeo del Concurso de Artículos. No obstante, son consejos que seguro os sirven para presentar webinars, videollamadas y grabaros en general.

POR QUÉ AÑADIR TU CÁMARA EN EL TUTORIAL

No hace falta que sea durante todo el vídeo, pero a las personas nos gusta ver caras. Nos humaniza. Hay numerosos estudios que hablan del impacto positivo que tiene la sonrisa, los ojos y lo mucho que influye en la comunicación de un mensaje. Cuando una cara nos cuenta algo prestamos más atención, nos acordamos mejor y entendemos mejor qué nos están contando.

Como es un tutorial, no hace falta que aparezca en todo momento, quizás al inicio y al final; pero bueno, eso lo trataremos en el siguiente artículo. 

LA LUZ ES TU AMIGA

Tengáis una cámara de mil euros, o una webcam que os ha tocado con los cereales, siempre trabajarán mejor con luz natural. Intentad apoyaros en luz natural. Más si tenéis alguna persiana que filtre la luz. La luz puede ser dura (la luz del sol directa) o suave (cuando se filtra con las nubes). La luz suave da un toque más limpio, genera menos sombras y os iluminará la cara de forma regular.

La primera vez que fui a grabar yo solo una entrevista tuve muchísima suerte. El día estaba un poquito nublado, estábamos en un interior y nos pusimos justo al lado de la ventana. El maquillaje de la persona a grabar brillaba genial y quedo una imagen muy limpia. Intentad aprovecharos de la luz natural cuando grabéis... pero ojo con que os de luz dura directa en los ojos. Os hará guiñar los ojos como un vigilante de la playa buscando tiburones.

Consejo para los más pros: si grabáis de noche y tenéis un foco potente que os da en la cara como hacen las influencers, intentad crear una escena con varios puntos de luz. Buscad una esquina (ahora leeréis el siguiente punto) y poned al fondo una lamparita. Es decir: tenéis vuestra cara bien iluminada y luego al fondo un puntito de luz que viene de una lámpara. Eso se llama contraluz. Sirve para separar al sujeto del fondo. Esto es para los más pros, para quien quiera hacerlo básico simplemente intentad iluminar vuestra cara con una luz principal que no sea muy dura, y si es natural, mejor. 

CÓMO ENCONTRAR UN BUEN ENCUADRE

Aquí podríamos hablar de diferentes conceptos que quizás os suene. Inclinación de la cámara, aire (espacio vació que hay alrededor del sujeto en un vídeo), profundidad...

Os recomiendo hacerlo sencillo.

Usad un trípode/soporte. Poned la cámara a la altura de los ojos. No os volváis súper locos en este punto. Intentad estar centrados, que haya un aire más o menos equilibrado en los laterales (no estar muy a la derecha o a la izquierda, aunque obviamente os iréis moviendo mientras habláis). 

Pero sobre todo intentad que sea limpio. Que no haya mucho ruido, distracciones (por ejemplo, una estantería al fondo llena de cables o libros descolocados). Que haya un fondo está bien, no tiene por qué ser un fondo blanco. Aquí os cuento lo que me decía mi "instructor" cuando grababa las entrevistas:

Solíamos grabar cada día en un spot, entonces, siempre me decía: busca una fuente de luz natural y luego intenta colocar al sujeto con una esquina al fondo. La esquina da profundidad, pero ojo, que lo que haya detrás sea discreto. Está en un segundo plano (incluso lo solíamos desenfocar). De esta manera encontrábamos el mejor set dentro de una habitación.  

Un buen encuadre debe ser limpio, equilibrado. Esto da sensación de profesionalidad ¡Por favor los horizontes han de estar rectos! Lo primero que veo en una foto profesional vs no es tener un horizonte no recto. Claro que los fotógrafos utilizan encuadres en diagonal en ocasiones, pero se nota mucho cuando es un recurso buscado y cuando simplemente la cámara está torcida porque hemos usado lo primero que hemos encontrado para sujetarla. 

CUIDA EL PLANO

Un consejo: intenta que no aparezcan elementos extraños. Que no se cuelen cosas por el fondo, que no esté el escritorio desordenado, etc. Este consejo seguro que lo teníais en mente.

SONIDO

Parece mentira, pero esto es importante. No hace falta que hagáis una grabación de estudio masterizada por un profesional. Simplemente que lo tengáis en cuenta y no pongáis la lavadora a la misma hora. Sí, yo he tenido problemas de captación de sonido en grabaciones, y es muy molesto. Ha sido mi responsabilidad y os digo: es mejor volver a grabar en el momento que esperar que no se note en montaje. 

LA MIRADA

En un tutorial miramos a cámara, en una entrevista no. Obviamente si os grabáis haciendo el proceso en directo, iréis dirigiendo vuestra mirada a la pantalla, pero en algún momento (sobre todo al inicio y al final) mirad a cámara.

Funfact: en las entrevistas no se mira a cámara. Normalmente se mira al redactor, sentado justo a un lado de la cámara. 

Un último consejo: practicad el guion. Tened un esquema mental. No hace falta que repitáis o leáis palabra por palabra, eso no queda natural. Simplemente un esquema de lo que vais a contar. 

Esto solo son consejos. Estoy seguro de que vuestra creatividad o necesidades os harán adaptaros a vuestra situación. Es maravilloso. Espero que os sirvan y pronto tendréis el (creo) último tutorial: consejos breves para una buena edición. 

¡GRACIAS! Por leerme. Me encanta leeros (y un saludo especial para la comunidad inglesa, suerte en vuestro concurso)

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer