Wow! Nice. Congratulations to the winners!
- Log in to post comments
Wow! Nice. Congratulations to the winners!
Congratulations to all the participants 🎆 Well done!
First of all, there are no links to docs you've tried in your post. If you add them (or the code from them) it will be easier to understand what you've already tried.
In general, I believe the easiest way to insert data in your case will be to use SQL. You can either write something like
insert into JASON.BikeDB (Make, Model) values (:make, :model)and pass the values of parameters.
Or if you wish to use your class method, you will first need to add a modifier SqlProc to it:
ClassMethod SaveNew(Make As %String, Model As %String) [SqlProc]
{
Set obj=##class(JASON.BikeDB).%New()
Set obj.Make=Make
Set obj.Model=Model
Set sve=obj.%Save()
}and then call this as a stored procedure:
begin
JASON.DataBase.SaveNew(:make, :model);
end;I feel like I have to pass more courses on the Learning Services to get more badges now 😁
Oh, this is super useful!
Can't even log in there - I get asked for a login and password in a loop 😭🤣 It doesn't seem to work for the Developer Community moderators' accounts.
Interesting idea. I will return to your suggestion a bit later.
Congratulations Robert! You definitely deserve all the accolades 🎉
I will definitely agree with @Chi Nguyen-Rettig - it may be pretty helpful for some basic stuff you forgot when you're middle or senior developer and when you know exactly what you're looking for. So it's basically a bit like doing the usual search but without the need to wade through the search results.
But when you're talking about beginners - I see all kinds of things from my students (who for some reason just don't want to open the lecture and prefer to get answers themselves from other sources) that have nothing to do with the reality and don't work most of the time.
All in all, I wouldn't use ChatGPT to write code that does something complicated. But it may or may not be a good source answers for simple questions. And in this case, you still need to understand what's going on to be able to assess the correctness of what you see. Case in point, some spam posts on the Community - people try to cheat and write "articles" using ChatGPT which generates class/package names that don't even exist.
And if you think about it, where does ChatGPT get its answers? From the knowledge base somewhere. So if this data is not there, it can extrapolate and come up with something that may give you general direction but may not work.
Niiiice, more time to come up with another article 😁
Congratulations!
Here is a video to illustrate the article: Generating meaningful test data using Gemini
I'm off to change my nick 😉
Wow, lots of useful new things! Well done the team!
Congratulations to all the participants and winners!
Oh, wow! It's so cool to be recognized not in 1 but 2 nominations! Congratulations to everyone!
Congratulations!
Wow, this is really cool in a very scientific kind if way.
For something like this, you can use a Learning Lab, it's free: https://learning.intersystems.com/course/view.php?id=929
Congratulations to the winners! Well done! Hope you had fun doing all the daily challenges!
I'd agree with @David Hockenbroch - if you have a UI, you will most likely find it easier to work with a csp page like a usual html and all that. But if you don't have a UI (or it's super simple), then you would create a cls file and extend the %CSP.Page.
Merry Christmas and Happy New Year!
I'm a translator again 😭
.png)
Wow, lots of events - online and offline this season!
Congratulations to all the winners and participants, particularly to @Anna Diak and @Andrii Mishchenko - I am so very proud of you!
It's a shame, I feel like there is often something going on with Cloud SQL. Especially during contests 😄 That's why I don't feel confident to incorporate it in my course 😢 - I ask my students to use it and then they can't even set it up without a fuss.
The command doesn't know. That's why you need to check the SQLCODE variable.
If SQLCODE = 0 then the row exists and it was updated. If SQLCODE = 100 then the row doesn't exist. If it not equal to either then you have a problem.
Example for Embedded SQL:
&SQL(update WH.Size
set Height = 1000
where %ID = 10)
write SQLCODEExample for Dynamic SQL:
SET myquery = "update WH.Size set Height = 1000 where %ID = 10"
SET tStatement = ##class(%SQL.Statement).%New()
SET tStatus = tStatement.%Prepare(myquery)
SET rset = tStatement.%Execute()
write rset.%SQLCODENot sure what you mean by "if the row exists" in regards with insert. The row does not exist, because you're creating it.
Awesome! The more, the merrier!
I'd say in general, having a structured data with the actual names of fields is much better than "parsing" the text with delimiters. So I would vote for FHIR. Maybe at some point there will be a better way to represent data - and it is OK - and people will switch to it. The main idea - not to make it painful on the developers to rewrite everything!