aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs10
-rw-r--r--OpenSim/Data/MSSQL/MSSQLManager.cs1
-rw-r--r--OpenSim/Data/MSSQL/Resources/CreateAssetsTable.sql1
3 files changed, 3 insertions, 9 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index 44d78ed..3f2e8a7 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -63,6 +63,7 @@ namespace OpenSim.Data.MSSQL
63 database.ExecuteResourceSql("CreateAssetsTable.sql"); 63 database.ExecuteResourceSql("CreateAssetsTable.sql");
64 return; 64 return;
65 } 65 }
66
66 } 67 }
67 68
68 /// <summary> 69 /// <summary>
@@ -114,9 +115,9 @@ namespace OpenSim.Data.MSSQL
114 115
115 SqlCommand cmd = 116 SqlCommand cmd =
116 new SqlCommand( 117 new SqlCommand(
117 "INSERT INTO assets ([id], [name], [description], [assetType], [invType], [local], [temporary], [data])" + 118 "INSERT INTO assets ([id], [name], [description], [assetType], [local], [temporary], [data])" +
118 " VALUES " + 119 " VALUES " +
119 "(@id, @name, @description, @assetType, @invType, @local, @temporary, @data)", 120 "(@id, @name, @description, @assetType, @local, @temporary, @data)",
120 database.getConnection()); 121 database.getConnection());
121 122
122 using (cmd) 123 using (cmd)
@@ -128,8 +129,6 @@ namespace OpenSim.Data.MSSQL
128 cmd.Parameters.AddWithValue("description", asset.Description); 129 cmd.Parameters.AddWithValue("description", asset.Description);
129 SqlParameter e = cmd.Parameters.Add("assetType", SqlDbType.TinyInt); 130 SqlParameter e = cmd.Parameters.Add("assetType", SqlDbType.TinyInt);
130 e.Value = asset.Type; 131 e.Value = asset.Type;
131 SqlParameter f = cmd.Parameters.Add("invType", SqlDbType.TinyInt);
132 f.Value = asset.InvType;
133 SqlParameter g = cmd.Parameters.Add("local", SqlDbType.TinyInt); 132 SqlParameter g = cmd.Parameters.Add("local", SqlDbType.TinyInt);
134 g.Value = asset.Local; 133 g.Value = asset.Local;
135 SqlParameter h = cmd.Parameters.Add("temporary", SqlDbType.TinyInt); 134 SqlParameter h = cmd.Parameters.Add("temporary", SqlDbType.TinyInt);
@@ -159,7 +158,6 @@ namespace OpenSim.Data.MSSQL
159 "name = @name, " + 158 "name = @name, " +
160 "description = @description," + 159 "description = @description," +
161 "assetType = @assetType," + 160 "assetType = @assetType," +
162 "invType = @invType," +
163 "local = @local," + 161 "local = @local," +
164 "temporary = @temporary," + 162 "temporary = @temporary," +
165 "data = @data where " + 163 "data = @data where " +
@@ -168,7 +166,6 @@ namespace OpenSim.Data.MSSQL
168 SqlParameter param2 = new SqlParameter("@name", asset.Name); 166 SqlParameter param2 = new SqlParameter("@name", asset.Name);
169 SqlParameter param3 = new SqlParameter("@description", asset.Description); 167 SqlParameter param3 = new SqlParameter("@description", asset.Description);
170 SqlParameter param4 = new SqlParameter("@assetType", asset.Type); 168 SqlParameter param4 = new SqlParameter("@assetType", asset.Type);
171 SqlParameter param5 = new SqlParameter("@invType", asset.InvType);
172 SqlParameter param6 = new SqlParameter("@local", asset.Local); 169 SqlParameter param6 = new SqlParameter("@local", asset.Local);
173 SqlParameter param7 = new SqlParameter("@temporary", asset.Temporary); 170 SqlParameter param7 = new SqlParameter("@temporary", asset.Temporary);
174 SqlParameter param8 = new SqlParameter("@data", asset.Data); 171 SqlParameter param8 = new SqlParameter("@data", asset.Data);
@@ -177,7 +174,6 @@ namespace OpenSim.Data.MSSQL
177 command.Parameters.Add(param2); 174 command.Parameters.Add(param2);
178 command.Parameters.Add(param3); 175 command.Parameters.Add(param3);
179 command.Parameters.Add(param4); 176 command.Parameters.Add(param4);
180 command.Parameters.Add(param5);
181 command.Parameters.Add(param6); 177 command.Parameters.Add(param6);
182 command.Parameters.Add(param7); 178 command.Parameters.Add(param7);
183 command.Parameters.Add(param8); 179 command.Parameters.Add(param8);
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs
index bea02fe..e421c5d 100644
--- a/OpenSim/Data/MSSQL/MSSQLManager.cs
+++ b/OpenSim/Data/MSSQL/MSSQLManager.cs
@@ -405,7 +405,6 @@ namespace OpenSim.Data.MSSQL
405 asset.Data = (byte[])reader["data"]; 405 asset.Data = (byte[])reader["data"];
406 asset.Description = (string)reader["description"]; 406 asset.Description = (string)reader["description"];
407 asset.FullID = new LLUUID((string)reader["id"]); 407 asset.FullID = new LLUUID((string)reader["id"]);
408 asset.InvType = Convert.ToSByte(reader["invType"]);
409 asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false; 408 asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false;
410 asset.Name = (string)reader["name"]; 409 asset.Name = (string)reader["name"];
411 asset.Type = Convert.ToSByte(reader["assetType"]); 410 asset.Type = Convert.ToSByte(reader["assetType"]);
diff --git a/OpenSim/Data/MSSQL/Resources/CreateAssetsTable.sql b/OpenSim/Data/MSSQL/Resources/CreateAssetsTable.sql
index c7cb21a..4d94699 100644
--- a/OpenSim/Data/MSSQL/Resources/CreateAssetsTable.sql
+++ b/OpenSim/Data/MSSQL/Resources/CreateAssetsTable.sql
@@ -6,7 +6,6 @@ CREATE TABLE [assets] (
6 [name] [varchar](64) NOT NULL, 6 [name] [varchar](64) NOT NULL,
7 [description] [varchar](64) NOT NULL, 7 [description] [varchar](64) NOT NULL,
8 [assetType] [tinyint] NOT NULL, 8 [assetType] [tinyint] NOT NULL,
9 [invType] [tinyint] NOT NULL,
10 [local] [tinyint] NOT NULL, 9 [local] [tinyint] NOT NULL,
11 [temporary] [tinyint] NOT NULL, 10 [temporary] [tinyint] NOT NULL,
12 [data] [image] NOT NULL, 11 [data] [image] NOT NULL,