Sql Server - List Of All The SQL Types And Their .NET Mapping?
Nov 27, 2009I need a list of all the SQL types and their .NET (vb would be preferred, but C# also works for me)equivalent.
View 3 RepliesI need a list of all the SQL types and their .NET (vb would be preferred, but C# also works for me)equivalent.
View 3 RepliesI have a problem with my code. My code is using the fileupload control to browse for a filename when you add a filename it processes it and the code runs fine on when it lives on local host, but when I put the code on our prodution server it cannot find the filenames listed by user.
For example if I use the upload control to browse to B:MISCH IntiveRPTTOFL_3.csv and the code lives on my localhost which know what that file path means it works, but if the code is moved to a production server it may or maynot know what B:/ is or B:/ maybe mapped to something else. Even if I am browsing to a file on my C drive it will work on if the code is on the machine that the C drive is on, but it will not work if the code is on another machine because obviously that file wouldnt be on that C drive.
[Code]...
I have three tables in my SQL Server DB. I need to import some CSV files into these tables. First table is a Order Table, which will contain all the order level information from that customer in that CSV File. Each order has multiple items and the second table is an item level data. Third table is a mapping table which shows the mapping for each customer . for a Customer say A ,
[Code]...
I have this code:
[Code]...
I'm writing a program and currently have 4 lists called Palette1, Palette2, Palette3, Palette4.Each contain 15 list items of Color type.I was hoping to create an array of lists but have been unsuccessfull in doing so.[code]
View 6 RepliesIs it possible to add Excel Custom Chart Type names to a list box at run time? That is, Microsoft.Office.Interop.Excel.Chart.XLChartType values to a list box?
View 1 RepliesCould any one list the encryption types in Visual Basic.
View 1 RepliesRight now, inside the access file, the mssql tables are set up as linked tables so queries can be written using tables from both databases. (e.g. "select * db1.table1 where db1.table1.somevalue not in db2.table1", or select into tables like that one)These queries need to be moved into a VB.NET project, but still be linked to the access file.ng loops or something?
View 3 RepliesI am attaching DBs using following code.
Dim conn As New SqlConnection("Server=MyHomeServerSQLExpress;Database=master;Integrated Security=SSPI")
Dim cmd As New SqlCommand("", conn)
cmd.CommandText = "CREATE DATABASE dbNoPWD ON ( FILENAME = 'd:dbNoPWD.mdf' ), ( FILENAME = 'd:dbNoPWD_log.ldf' ) FOR ATTACH"
conn.Open()
cmd.ExecuteNonQuery()
cmd.Dispose()
conn.Dispose()
I do not want to give any username and password. When I ran the above code and then checked SSMS, I found my attach DB was not checked in Roles (pls. see pic.) The problem with this is my network computers can not access this DB. I want to run some code like above (without sa password) and want that all my network computers can access the DB without my user get involved in setting up SSMS.
Assuming a base type of "Message"...
[Code]...
I would like to have one collection of Message objects which can be either PhoneMessages or MailMessages, so that I can iterate through the list and deal with each message based on what type it happens to be.
Attempting just to use .Add() fails, saying that I can't add an item of type PhoneMessage to a List(Of Message). Is there some elegant way to accomplish what I'm trying to do? I had thought I could accomplish this with generics, but I think there's a gap in my understanding. If it can be accomplished in .NET 2.0, that would be ideal.
I really need to know the list the types of components that are provided by the VB .Net?
View 3 RepliesIs there any way to select items in a list that aren't contained in another? For example:list1 = From t In list1 Where Not list2.Contains(t.column1)That gives me the error:Value of type 'Integer' cannot be converted to '<anonymous type>'which makes sense, since list2.Contains is expecting the same type as list2. However, the list types are different. I want only to select based on column comparisons.
View 3 RepliesAny best approach to what I'm trying to achieve (linq to sql, returning list of data to show in a grid/list etc etc)... Its complaining about anonymous type conversion, and from what I'm reading, thats not elegant way of doing it.
Public Function GetHistory(ByVal historyId As Integer) As List(Of ?????????)
Using dc As New myDataContext(Application.GetConnection)
Return (From t In dc.ActionTypes, a In t.MyTable Where a.HistoryID = historyId Select a.ActionOn, a.ActionBy, t.Description, a.ImpactedItem, a.ActionDescription).ToList
End Using
End Function
I am looking to define data types by fields in SQL Server 2005. My source is an Excel spreadsheet and I cannot define by columns because each row requires a set of definitions applied to each field in that row. Ex, row 1 requires field1 to be CHAR while in row 2 field 1 needs to be DATE.
View 1 RepliesGiven a list of objects, I'd like to print a string version of them just in case the object.ToString() result is a relevant string.By that I mean I don't want to get things like:
obj.ToString() -> System.Collections.Generic.List`1[MyLib.Dude]
obj.ToString() -> System.Collections.Generic.Dictionary`2[System.Int32,System.DateTime]
obj.ToString() -> System.Byte[]
But I want to get things like:
obj.ToString() -> Hi
obj.ToString() -> 129847.123
obj.ToString() -> Id = 123
What should be the best way to implement this in a method:
Public Sub PrintInterestingStuffOnly(ByVal coolList as Ilist(Of Object))
For Each obj in coolList
'insert solution here
[code].....
In VS 2008, VB.Net, I am successful connecting to a local SQL Server (version 8) and seeing all tables/views/procedures in Server Explorer. The local OS is Win XP Pro SP3. I created an ODBC data source to a remote SQL server (also version 8) with a database of the same structure as the local one. The connection tests out ok. The remote computer runs Windows Server 2000 SP4. In the VS 2008 Server Explorer I add this ODBC source. When I click on the plus-signs to expand items, neither the tables nor the views show anything, whereas the full list of procedures appears. Is it the old SQL Server version? Is it the old Server OS version? Something else alltogether?
View 2 RepliesIn VS 2008, VB.Net, I am successful connecting to a local SQL Server and seeing all tables/views/procedures.I created an ODBC data source to a remote SQL server with a database of the same structure as the local one.The connection tests out ok. In the VS 2008 Server Explorer I add this source. When I click on the plus-signs to expand items, neither the tables nor the views show anything, whereas the full list of procedures appears.How can I see the lists of tables and views in Server Explorer for an ODBC source?
View 1 RepliesI have a small problem i'm trying to fetch list of directoies from 1 special ftp server wich does not support LIST command i was try this code and it works for all ftp server i have try exept this special one :
'' Get the object used to communicate with the server.
'Dim request As FtpWebRequest = DirectCast(WebRequest.Create("ftp://" & txtFTPhost.Text), FtpWebRequest)
[code]...
I'm getting error 502 which means command is not supported and app crashed. I would just simple said leave it but i have try normal ftp clients like FlashFXp and it works just fine (i can see error in the log but it just pass it and show direcoties)
I have a class with a Property called 'Value' which is of type Object.Value can be of any type, a structure, a class, an array, IList etc.My problem is with the setter and determining whether the value has changed or not.This is simple enough for value types, but reference types and lists present a problem.For a class, would you assume that the Equals method has been implemented correctly, or just assume that the value has changed every time the setter is called?If I did assume it's changed, then perhaps I should assume it for value types as well, so that the behaviour is consistent.
View 2 RepliesI need to compare two dictionary values if the types stored are equal, this is what i have
if gettype(Args(key)) = gettype(argtypes(key)) then
'' do something
end if
[Code]....
I ALWAYS USED WITH VB6 F8 KEY TO DEBUG ON WIN 7 ITS MAPPED TO VOL CNTRL
View 4 RepliesSQL Server has a Data Type of "Float". Visual Studio has a Data Type of "Decimal". In other words, if I have a variable in a VB.Net app that is defined as a "Decimal" ...can I move that value into a SQL Server Data Table column defined as a "Float"?
View 4 Repliesis there anyway that i can place an object in a specific coordinates in vb?
View 4 RepliesUsing automapper i am mapping my ViewModel to my business object, however i want to map to an existing object instance and only map the properties on my view model. e.g.
ProductModel has id,name,code
ProductBusiness has id,name,code,dateadded
Function Add(ByVal model As ProducModel) As ActionResult
[code]....
i want to somehow pass in the existing business object instance and only map the 3 properties that are on both objects, dateadded should stay the same as it was in the database.
I have a form with a button that says "Open CSV".I want to be able to click that button. Then browse for a .CSV file, and after I select the file, populate a combobox with all of the headers of the .CSV.I would then be mapping these headers to fields in my database, then import the .CSV data into my database.
View 3 RepliesThe issue I'm currently having is mapping multiple GUI fields to object properties (i.e. Presentation layer to Business Logic Layer mapping). To be more specific, this is in VB.Net 2.0 WinForms. The nature of the solution requires us to have 4 columns which exhibit the same type of behavior on our GUI - each column consisting of 11 textboxes (we'll just use this small sample size, as the problem extends beyond 11 textboxes).
What I am currently doing is setting the tag of each textbox in all four columns to a value like so:
Textbox1.tag = "name"
Textbox2.tag = "type"
Textbox3.tag = "speed"
[Code]...
As you can see this can get very bad, rather quickly. Currently we're setting 43 some odd properties that can be mapped to -- thus that select statement is extremely long -- many of which are embedded in multiple methods to try and attempt DRY (I've watered down the code to essentially a conceptual implementation).
Question is: how can I refactor this? I've attempted using a dictionaries/hashes to a certain extent, but it either became overly complex, or just plain didn't make an implementation sense as it convoluted the problem even more.
I've followed the instructions found at the letter (albeit also adding the parameters to pass a username and password), but have had no success connecting to a network drive that requires authentication to access.
View 8 RepliesI have a very long list of points I would like to plot on any state in the US. I would prefer to plot each point with just a dot. All I have is an address that includes the street address, city and state and possibly the zip code. Ideally, I would like to place the resuts in a VB Picture box. I understand there is a Google interface but have found in my research the examples to be lacking exactly what I need.
View 3 RepliesI have two arrays with equals number of values, is there a way to match the values exactly in same order, as such:
FirstArray("1,"2","3","4")
SecondArray("John","Samantha","Tony","Joe")
1---John
[Code].....
<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-
[code]....
what options do I have for creating a VB.Net application with a mapping framework; obviously I am not going to write my own. So is there any OFFLINE components free or otherwise that I can use?
Application Background : Basically I have a mobile device that sends its location back to a socket server (I am writing using .Net sockets) every 10 Seconds (possibly longer 10min, not decided). The client (which I will also write and need the map component for) will login to the server and download the latest number of GPS points and simply plot them onto a map surface (thus the maps need to be of street level quality). Although the map database can be updated over the internet, I have to assume the user does not have an internet connection. So using something like Google earth is no good. Initially I need the UK only, but will need the option for Europe and possible the USA later on.