|
I think you've got crooked eyes, where do you see that i want someone to write the game for me?
|
|
|
|
|
Minhaaj Edoo wrote: Is it possible to make a game in vb.net?
If so can i get resources(tutorials,notes etc) on how to make one?
Let's look at your questions. The answer to both is really just "yes", although I did suggest that Google would help you to find tutorials for point 2. Have you actually tried looking for some for yourself?
Your question is so general (how to make a game in vb.net) that it is impossible to provide much more information. Point 2 of http://www.codeproject.com/Messages/3122367/How-to-get-an-answer-to-your-question.aspx[^] says "Be specific", something which your question is not.
|
|
|
|
|
Apparently you want someone to do your searching for you so here you go[^].
|
|
|
|
|
HI,
Every Body
This is My Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Sql;
using System.Data.SqlClient;
using Microsoft.SqlServer.Server;
using System.Data.SqlTypes;
using System.Text.RegularExpressions;
namespace trigger_test
{
public class trigger
{
public static void showinserted()
{
SqlTriggerContext triggContext = SqlContext.TriggerContext;
SqlConnection conn = new SqlConnection(" context connection =true ");
conn.Open();
SqlCommand sqlComm = conn.CreateCommand();
SqlPipe sqlP = SqlContext.Pipe;
SqlDataReader dr;
sqlComm.CommandText = "SELECT pub_id, pub_name from inserted";
dr = sqlComm.ExecuteReader();
while (dr.Read())
sqlP.Send((string)dr[0] + "," + (string)dr[1]);
}
}
}
========================================================
SQL SERVER
CREATE ASSEMBLY triggertest_2
FROM 'G:\Vijaya\trigger_test\trigger_test\bin\Debug\trigger_test.dll'
WITH PERMISSION_SET = SAFE
CREATE TRIGGER tri_Publishes_clrs
ON publishers_1
FOR INSERT
AS
EXTERNAL NAME triggertest_2.[trigger_test.trigger].showinserted
Create Table publishers_1
(
pub_id int,
pub_name nvarchar(50)
)
INSERT publishers_1
(pub_id, pub_name)
values (18,'Vijaya')
ERROR:- Msg 6522, Level 16, State 1, Procedure tri_Publishes_clrs, Line 1
A .NET Framework error occurred during execution of user-defined routine or aggregate "tri_Publishes_clrs":
System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'.
System.InvalidCastException:
at CLR_Triggers.trigger.showinserted()
How to Solve this Error????
Help
Thanks In Advance....
|
|
|
|
|
Member 11161625 wrote: System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'. You cannot cast (i.e. tell the compiler to change) an integer to a string; you must use a conversion method to change it.
|
|
|
|
|
HI
Every Body,
This is my Class File Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Microsoft.SqlServer.Server;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Xml;
using System.Text.RegularExpressions;
using System.Transactions;
namespace TrgMail
{
public class trgMail
{
[SqlTrigger(Name = @"EmailAudit", Target = "[dbo].[Users]", Event = "For Insert")]
public static void MailValid()
{
String userName;
String realName;
SqlCommand command;
SqlTriggerContext triggerContext = SqlContext.TriggerContext;
SqlPipe pipe = SqlContext.Pipe;
SqlDataReader reader;
switch (triggerContext.TriggerAction)
{
case TriggerAction.Insert:
using (SqlConnection connection = new SqlConnection(@"context connection=true"))
{
connection.Open();
command = new SqlCommand(@"Select *from Inserted;",connection);
reader = command.ExecuteReader();
reader.Read();
userName = (string)reader[0];
realName = (string)reader[1];
reader.Close();
if (IsValidEMailAddress(userName))
{
command = new SqlCommand(@"Insert[dbo].[UserNameAudit]Values('" + userName + @"','" + realName + @"');", connection);
pipe.Send(command.CommandText);
command.ExecuteNonQuery();
pipe.Send("You inserted:" + userName);
}
else
{
try
{
pipe.Send("Invalid EmailID");
Transaction trans = Transaction.Current;
trans.Rollback();
}
catch (SqlException ex)
{
}
}
}
break;
}
}
public static bool IsValidEMailAddress(string email)
{
return Regex.IsMatch(email,@"^([\w-]+\.)*?[\w-]+@[\w-]+\.([\w-]+\.)*?[\w]+$");
}
}
}
===========================================================================================
SQL SERVER 2008
sp_configure CLR_Enabled,1
Go
Reconfigure
Go
alter Database Vijaya set Trustworthy on
Create Assembly ValidateEmailAssemblies
From'G:\Vijaya\SqlServerProject2\SqlServerProject2\bin\Debug\SqlServerProject2.dll'
with Permission_set=Unsafe
Create Table Users2
(
UserName nvarchar(200) Not Null,
RealName nvarchar(200)Not Null
)
Create Table UserNameAudit2
(
UserName nvarchar(200)Not Null,
RealName nvarchar(200)Not Null
)
Create Trigger EmailAudit1
on Users2 for Insert
As External Name ValidateEmailAssemblies.trgMail.MailValid
GO
ERROR:- Msg 6505, Level 16, State 2, Procedure EmailAudit1, Line 1
Could not find Type 'trgMail' in assembly 'SqlServerProject2'.
Please Help???
How to solve this Problem???
Thanks In Advance...
|
|
|
|
|
You have different namespaces in there. In your assembly, it's TrgMail but you have used ValidateEmailAssemblies in your stored procedure.
|
|
|
|
|
Hello,
Every Body,
I am getting the Following ERROR:-
Msg 6505, Level 16, State 2, Procedure EmailAudit, Line 1
Could not find Type 'trgMail' in assembly 'ClassLibrary1'.
How to solve this Error????
Thanks
In Advance...
|
|
|
|
|
As you haven't posted any code from trgMail, or from the code that's attempting to call this, we can only offer a guess. At a guess, I'd say that trgMail is not exposed as public (or protected if you're inheriting). Alternatively, it could be that there is no trgMail at all.
|
|
|
|
|
Hello,
Every Body,
I am getting an error:-CREATE ASSEMBLY for assembly 'test3.5' failed because assembly 'test3.5' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message [ : Test.Test::my_func][mdToken=0x6000001][offset 0x00000000] Unable to resolve token.
How to solve this ERROR????
Thanks
IN ADVANCE....
|
|
|
|
|
Without more information that is impossible to answer. Please edit your question and explain what language you are using, and where in your code the error occurs.
|
|
|
|
|
I have a RadGrid (Telerik) with 2 columns. In first column I have radionButtonList. In editMode based on selected values I need to enable/disable telerik:GridDropDownColumn.
Please help.
<telerik:GridTemplateColumn DataField="IsHighLevel" HeaderText="High Level">
<ItemTemplate>
<%# IIf(Convert.ToBoolean(Eval("IsHighLevel")) = True, "Yes", "No")%>
</ItemTemplate>
<EditItemTemplate>
<asp:RadioButtonList SelectedValue='<%# IIf((Eval("IsHighLevel")) = True, "Yes", "No")%>'
OnSelectedIndexChanged="chkIsHighLevelIndexChanged" ID="rblIsHighLevel" RepeatDirection="Horizontal"
runat="server" AutoPostBack="True">
<asp:ListItem Value="Yes" Text="Yes"></asp:ListItem>
<asp:ListItem Value="No" Text="No"></asp:ListItem>
</asp:RadioButtonList>
<asp:TextBox runat="server" ID="txtHighLevel" Visible="false"></asp:TextBox>
</ItemTemplate>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridDropDownColumn UniqueName="AccessLevelID" ListDataMember="AccessLevel"
SortExpression="AccessLevelID" ListTextField="Description" ListValueField="DDL_AccessLevelID"
HeaderText="AccessLevelID" DataField="GRID_AccessLevelID
Protected Sub chkIsHighLevelIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
Try
Dim rblIsHighLevel As RadioButtonList = DirectCast(sender, RadioButtonList)
If rblIsHighLevel.SelectedValue = "Yes" Then
???? access dropdowncolumn to enable
End If
|
|
|
|
|
PLEASE HELP ME NOW. I must submit my project tomorrow
For 2 weeks i haven't made a successful save. what is wrong with my codes? i have this error:
The model item passed into the dictionary is of type 'WebTime_Sheet.Models.RegisterViewModel', but this dictionary requires a model item of type 'WebTime_Sheet.Models.Users'.
The Action Results
[AllowAnonymous]
public ActionResult Register()
{
ViewBag.RoleName = new SelectList(db.Roles, "RoleName", "RoleName");
return View();
}
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Register(RegisterViewModel model, DateTime? EmploymentEndDate = null)
{
if (ModelState.IsValid)
{
var user = new ApplicationUser {
UserName = model.Email,
Email = model.Email };
var result = await UserManager.CreateAsync(user, model.Password);
if (result.Succeeded)
{
using (var context = new TimeSheetsEntities())
{
var u = new Users
{
UserId = model.UserId,
SocialSecurityNumber = model.SocialSecurityNumber,
FirstName = model.FirstName,
LastName = model.LastName,
Address1 = model.Address1,
ZipCode = model.ZipCode,
City = model.City,
PhoneNumber1 = model.PhoneNumber1,
PhoneNumber2 = model.PhoneNumber2,
EmploymentStartDate = model.EmploymentStartDate,
EmploymentEndDate = model.EmploymentEndDate,
Email = model.Email,
Password = model.Password,
RoleName = model.RoleName,
};
context.Users.Add(u);
context.SaveChanges();
}
await SignInManager.SignInAsync(user, isPersistent:false, rememberBrowser:false);
return RedirectToAction("Index", "Home");
}
AddErrors(result);
}
return View(model);
}
Then the class...
public class RegisterViewModel
{
[Required]
[Range(10000 - 99999, Double.MaxValue, ErrorMessage = "Create 5 digit UserId")]
[Display(Name = "User Identification")]
public int UserId { get; set; }
[Required]
[Display(Name = "Social Security number")]
public string SocialSecurityNumber { get; set; }
[Required]
[Display(Name = "Firstname")]
public string FirstName { get; set; }
[Required]
[Display(Name = "Lastname")]
public string LastName { get; set; }
[Required]
[Display(Name = "Adress Line 1")]
public string Address1 { get; set; }
[Required]
[Display(Name = "Adress Line 2")]
public string Address2 { get; set; }
[Required]
[Display(Name = "Postal code")]
public string ZipCode { get; set; }
[Required]
[Display(Name = "City")]
public string City { get; set; }
[Required]
[Display(Name = "Telephone number")]
public string PhoneNumber1 { get; set; }
[Required]
[Display(Name = "Telephon number")]
public string PhoneNumber2 { get; set; }
[Required]
[Display(Name = "Date of employment")]
public DateTime EmploymentStartDate { get; set; }
[Required]
[Display(Name = "End of Employment")]
public DateTime? EmploymentEndDate { get; set; }
[Required]
[EmailAddress]
[Display(Name = "Email")]
public string Email { get; set; }
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[DataType(DataType.Password)]
[Display(Name = "Confirm password")]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; }
[Required]
[Display(Name = "Role")]
public string RoleName { get; set; }
|
|
|
|
|
ON which line does it throw this error?
|
|
|
|
|
|
Screen shots like this are useless. You're pasting something where the font is so small it's impossible to read. It's ALWAYS better to copy and paste the text.
You're passing the wrong type of object to your view page.
The view is expecting an object of type WebTime_Sheet.Models.Users and your return View() line is trying to pass in an object of type WebTime_Sheet.Models.RegisterViewModel .
|
|
|
|
|
HI,
ALL
I want simple example about Service Broker????
|
|
|
|
|
|
I have a nested datalist where the parent datalist has child datalist within each itemtemplate.the entrie page is posted to server and no ajax functionality is used.
the datasource for parent grid is set in vb.net code while for the child grid is set in the html code itself.
On the first load of the page the grid is loaded perfectly fine.
However on click of any button when i do the page-reload and call databind for the parent grid the child grid is not reloaded with data and shows no data at all.I have call databind for child datalist inside the itemdatabound of parent.
I have tried many approaches but for can not figure out why it is not working ,technical all looks fine to me.Cant post the code here..But i can give more explanation if required.
thanks in advance.
|
|
|
|
|
Hi Guys
As I'm new to this forum, I got my first big project to do.
I'm kind of a beginner in vb.NET but I'm willing to learn what it needs to complete my task on a sophisticated level
So, in general, I got several PDF Files which are entirely based on the same template. So every single PDF got almost the same Structure.
The content is mostly on a two column table base.
(for the beginning, later on i'd also like to extract things out of the Headline, etc.)
On the Left Column is the topic which is always the same, on the righthand column is the Content that I want/need to extract. This content varies.
What I need is, that I can "import" this PDF file to my vb.NET Program, this scans, or extracts the content for example from Coloumn B, Row 1 to Textbox 1, from Column B, Row 2 to Textbox 2 and so on.
Is that possible?
and at first id like to get a foot into it, and extract a whole PDF to my Textbox.
How do I do that? Anyone got Tutorials or something like that?
Please keep in mind, that i'm quiet a beginner in vb.NET
Thank you for your time
|
|
|
|
|
|
Good point, thank you.
Is it only available for C#?
Because right now, i'm capable of Visual Basic, and not C#
|
|
|
|
|
No it works with either, both VB.NET and C# produce the same (more or less) executable code. Unfortunately if you don't know C# you may find using this library a bit of a challenge, but I think your project is quite a major challenge for someone new to .NET. You probably need to do quite a bit more research to find some more tutorials that are written specifically for VB.NET.
|
|
|
|
|
Could you be so king and take a closer look to This?[^]
it looks very satisfying, but I dont know, how to import my PDF? Trough a OpenFileDialog? And if yes, how do i manage it, to get it into these functions?
Thank you anyway!
|
|
|
|
|
The source you linked could probably work, looks a bit like a quick & dirty solution though.
You would have to create an instance of the pdf2txt class with the filename of the pdf-file as parameter (which you could get through an OpenFileDialog) and then call GetText() on it.
|
|
|
|
|