I get this error whenever my application tried to access the azure database, it connects to the database just fine it's only when it tries to access the tables. This is the query i used to create the table:
-- Drop existing tables if they exist
IF OBJECT_ID('files', 'U') IS NOT NULL
DROP TABLE files;
-- Create 'files' table
CREATE TABLE files (
FileID int IDENTITY(1,1) PRIMARY KEY,
FileExtension varchar(255),
BlurHash varchar(255),
Status bit NOT NULL DEFAULT 0
);
-- Drop existing tables if they exist
IF OBJECT_ID('users', 'U') IS NOT NULL
DROP TABLE users;
-- Create 'users' table
CREATE TABLE users (
UserID int IDENTITY(1,1) PRIMARY KEY,
UserName varchar(255),
Password varchar(255)
);
-- Insert data into 'users' table
INSERT INTO users (UserName, Password) VALUES
('dara', '123'),
('raven', '123'),
('china', '123');
-- Drop existing tables if they exist
IF OBJECT_ID('user_account', 'U') IS NOT NULL
DROP TABLE user_account;
-- Create 'user_account' table
CREATE TABLE user_account (
UserID int PRIMARY KEY,
UserName varchar(255),
Gender varchar(10) DEFAULT '',
Image varbinary(max),
ImageString varchar(255) DEFAULT '',
Status bit NOT NULL DEFAULT 1,
CONSTRAINT FK_UserID FOREIGN KEY (UserID) REFERENCES users (UserID) ON DELETE CASCADE ON UPDATE CASCADE
);
-- Insert data into 'user_account' table
INSERT INTO user_account (UserID, UserName, Gender, Image, ImageString) VALUES
(1, 'dara', '', null, ''),
(2, 'raven', '', null, ''),
(3, 'china', '', null, '');