#1 Re: mORMot 1 » MVC form action question » 2014-11-14 06:32:17

ab wrote:

Did you try with quotes?

Default?View=MyPage&GuID="{B387D2CE-XXXX-XXXX-XXXX-B7AAE73D5E27}"

I tried and I get this one:

GuID = '"{B387D2CE-XXXX-XXXX-XXXX-B7AAE73D5E27}"'

with quotes. I don't want to cut the String. You know another solution?

#2 Re: mORMot 1 » MVC form action question » 2014-11-13 14:28:23

But I .. think it dont works correctly.

If I want to go to

Default?View=MyPage&GuID={B387D2CE-XXXX-XXXX-XXXX-B7AAE73D5E27}

There is a variable View (correctly) and a variable GuID (nothing).

In parameters I called it this way:

const View, GuID : RawUTF8;

Gives me:

View = 'MyPage';
GuID = ''; // nothing

How can I solve this?

Edit:
I tried it without brackets and it worked. Is it possible to get it with the brackets?

#3 Re: mORMot 1 » MVC form action question » 2014-11-12 14:54:16

Thank you for your answere.

What is about TGUID?

If I want to add a TGUID over the GET-method I do not get the variable.

Does this not support TGUID in a GET method or URI? Or this happens because there are curly brackets and he doesn't know what to do?

Regards

#4 mORMot 1 » MVC form action question » 2014-11-11 06:30:06

Pyjama
Replies: 6

Hello ab,

I did a form like:

<form action="Account?View=Something" method="post">
	<input type="text" name="SomethingElse" value="Anything"></input>
	<span>SomethingElse</span>
	<input type="submit" name="submit" value="Submit"></input>
</form>

But it don't works.
If I delete the action parameters, so there is only "Account", it works.

Why I could not give the action any other parameters? The variables should be

View = Something
SomethingElse = Anything
submit = Submit

#5 Re: mORMot 1 » MVC/MVVM Web Applications with mORMot! » 2014-10-28 06:12:20

You typed it correctly?

This error says, that the login information is not correct.

Maybe you've changed something? Another way would be to look up if the User exists in the database.

If there is a User, you just have to know the right password.

#6 mORMot 1 » Authentication by Server-Side » 2014-08-13 05:18:22

Pyjama
Replies: 1

How is it possible to authenticate the server to get access to the database?

For example the project 19 with the FishFacts.

If I turn on the authentication, how the server get access to the database?

Turn on the authentication:

DB := TSQLRestServerDB.Create(Model,fDatabaseFileName, true);

Now the question, how the server gets access to the database. If i have a client, the client gets this authentication-code:

TSQLHttpClient(Form1.Database).SetUser(StringToUTF8('User'),StringToUTF8('synopse'));

How is this possible on server side?

#7 mORMot 1 » Mustache - Sections » 2014-08-06 10:13:42

Pyjama
Replies: 1

Hi there!

I have a question about sections in mustache.

For example, I have the following code as a template:

{{#names}}
The friend of {{name}} is {{friend}}.
{{/names}}

It should be very easy. There is a name who got a friend.

I have more than one name with different friends, how can I realize that?

TDocVariant.New(doc);
doc.names := true;
doc.name := 'Peet'; // Here I want to get more names
doc.friend := 'James'; // and more friends

mustache := TSynMustache.Parse(myHTML);
html := mustache.Render(doc);

I want to have some output like this:

The friend of Peet is James.
The friend of Olaf is Tom.
The friend of...

How can i realize that? smile

#8 Re: mORMot 1 » Delete all entries in table » 2014-07-08 12:33:07

Thanks, works well.

So I can't use it without any parameters like

Server.Delete(TSQLMyRecordClass);

right?

I always have to insert parameters?

#9 mORMot 1 » Delete all entries in table » 2014-07-07 10:15:02

Pyjama
Replies: 3

Hi all,

i just want to delete all entries from the database table by pressing a button. That's why i don't do it manually.

I tried to use the following code:

Client.Delete(Record);

and also

Client.Delete(Record, ID);

and

Client.Delete(Record, 'id=?', ['']);

I get an error which says that the version 'delete' is overload.

Anyone has an idea how i can delete all entries in a table easily with mORMot?

Thanks.

Board footer

Powered by FluxBB