Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Can only create schema in simple_query #310

Open
wyhaya opened this issue Sep 2, 2023 · 0 comments
Open

Question: Can only create schema in simple_query #310

wyhaya opened this issue Sep 2, 2023 · 0 comments

Comments

@wyhaya
Copy link

wyhaya commented Sep 2, 2023

The only time I don't get an error is when I use a simple_query.

// Error
let rst = client .execute("CREATE SCHEMA name", &[]) .await;
// Error
let rst = client.query("CREATE SCHEMA name", &[]).await;
// Ok
let rst = client.simple_query("CREATE SCHEMA name").await;

Error message:

[examples/tokio.rs:32] rst = Err(
    Server(
        TokenError {
            code: 156,
            state: 1,
            class: 15,
            message: "Incorrect syntax near the keyword 'SCHEMA'.",
            server: "92b6321b9335",
            procedure: "",
            line: 1,
        },
    ),
)

I am a beginner in SQL Server, and I'm not sure if it's a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant