Thanks Steve. I knew it was something stupid.
DerekFL
Posts
-
Calling a function gives me very unhelpful error message -
Calling a function gives me very unhelpful error messageIm trying to debug a function in VB My code looks like this. When I call Dim Ip as Int64 = GetLocId("192.168.1.1, cn) I get error "Syntax error or access violation" Its got to be something stupid I am doing. Namespace Ip Public Class Class1 Public Function GetLocId(ByVal Ip As String, ByVal connection As String) As Int64 Dim cn As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(connection) Dim command As String = "EXEC [dbo].[sp_location_i]" 'Dim IpId As Int64 Dim IpLocId As Int64 cn.Open() Dim cmd As System.Data.OleDb.OleDbCommand = cn.CreateCommand() cmd.CommandType = CommandType.StoredProcedure cmd.CommandText = command Dim pIp As OleDbParameter = cmd.Parameters.Add("@Ip", OleDb.OleDbType.VarChar, 15) pIp.Value = Ip Dim pIpLocId As OleDbParameter = cmd.Parameters.Add("@IpLocId", OleDbType.BigInt) pIpLocId.Direction = ParameterDirection.Output 'Try cmd.ExecuteNonQuery() 'Catch exc As OleDbException ' Console.WriteLine(exc.Message) ' IpLocId = 0 --Unknow location 'Finally cn.Close() 'End Try IpLocId = Convert.ToInt64(pIpLocId.Value) Return IpLocId End Function End Class End Namespace
-
Calling a function using lookup in SSISI have a datasource that pulls a IP address. I need to call a function in SQL does the same as the asp class, that converts it to a non dotted format http://www.maxmind.com/app/csv[^] which I can insert into my destination. I tried using a lookup data flow item with SELECT [LogTracking].[dbo].[sfnConverIp] (?) but I can not map it to a column with the dotted IP. There has to be a simple way right?
-
Worst app ever!I would work for free for a week just so I could find out whats the real deal is. It would be worth the vacation time just to find out all the politics.
-
Worst app ever!I just started at a new place and came on to to help with their database and application stuff. I knew it was bad as soon as I saw their databases. For example they have an article table and a column called ArticleTopics which has "23,5,45,78,23,.." they where pulling it into the app normalizing it and getting all topics which of course had TopicCategories "34,56,..." and such. Not a join could be done in the whole database. I normalized the database using SSIS script component and rewrote the app from coldfusion to ASP. Finally I submit a request to shut down the old system do one last pull of the data in SSIS and register the new app with the domain and this admin comes to my office screaming that I should never use foreign keys and all normalization should be done in the app because they cause performance problems and that asp is crap, I should use dhtml. I couldn't believe it when my boss told me I need to rewrite it. I lost it. Anyway anyone need a good DBA/OLAP Designer?
-
HELP, finding median in SQL (Stressed....)It in the Regards table
-
Visual Studio and SQL 2005You don't need it but I do find it useful when you need to do a local compile to debug a problem.
-
Manipulate SQL StringSELECT LEFT(InventoryID, LEN(InventoryID) - CHARINDEX('CE',InventoryID))
-
What SQL language? Can make SQL Server downtime (Dead, paralysis)So a Rabbi, a Monk and a Priest walk into a bar and the bartender says "What is this some kind of joke?" //I am available for birthday party's and barmitzfas....
-
Queue implentation in SQL ServerNeed more info but just from the sound of it you should be using 1 record with nested records in XML using XML data type. If you are using a queue you are using xml for the conversation.
-
Packages in SQL server 2005Schemas can be used to organize any type of objects. You just make the schema owner dbo. Here is an article discussing the topic. http://www.sqlteam.com/article/understanding-the-difference-between-owners-and-schemas-in-sql-server[^]
-
how to split a string in oraclejust hit the return key on the typewriter instead of space key.
-
help setting up matrix cross-refrence query [modified]Why no have a category id in the object table with foreign key to category table? Seems like you have a cross ref table which is only needed in a one to many or many to many relationship. Can an object have 2 categories?
-
Authentication problems since server changeLook at the system, security and application logs on SQL Server. Look for security failures and dns errors. yell at the admins. rinse and repeat..
-
SQL Import Wizard data types dont matchWith SQL Server SSIS add a data transformation task and add a datasource (where the bad data is) and a destination (scrubbed data). drag green arrow from source to destination. Add a second destination and set on failure of first destination to redirect to second (red arrow). You can use a flat file if you want.
-
Comprare two column headingsBy violates do you mean violates a foreign key?
-
Error in SSIS conversion [modified]I figured it out I had to convert to text stream and then use derived column add as new column (DT_STR,4000,1252)(DT_TEXT,1252)[Description] What a pain!
-
Error in SSIS conversion [modified]I tried this but then I get an error "Error at Insert Articles [Data Conversion [3463]]: Conversion from "DT_TEXT" to "DT_WSTR" is not supported".
-
Error in SSIS conversion [modified]I have a SQL table that I am importing that has 2 columns title and description of type text that need to be converted to varchar(max). none of the 2 have more than 4000 chars and its English only. I created a data flow task with a transformation to convert both columns to string [DT_STR] 4000. My destination has both columns as varchar(MAX). I get a very informative error of Cannot create an OLE DB accessor. Verify that the column metadata is valid. When I GIS most suggest the conversion which I am already doing. Anyone been through this?
modified on Monday, August 4, 2008 2:30 PM
-
Table name as part of column nameI dont know if this is helpful but here is an example of my customer DAL. I use Microsoft patterns and practices for SQL data access but you can just use SQL data adapter. I just dim cust as new DAL.Customer() cust.CustomerName = textbox1.text .... cust.save or cust.FetchCustomer(22) Imports Microsoft.VisualBasic Namespace DAL Public NotInheritable Class Customer #Region " Local Variables " Private _CustomerId As Integer Private _CustomerName As String Private _Address1 As String Private _Address2 As String Private _City As String Private _StateProvince As String Private _ZipPostal As String Private _CountryCode As String Private _DateCreated As Date Private _DateUpdated As Date Private _IsDirty As Boolean = False #End Region #Region " Public Properties " Public Property CustomerId() As Integer Get Return _CustomerId End Get Set(ByVal value As Integer) If value <> _CustomerId Then _IsDirty = True End If _CustomerId = value End Set End Property Public Property CustomerName() As String Get Return _CustomerName End Get Set(ByVal value As String) If value <> _CustomerName Then _IsDirty = True End If _CustomerName = value End Set End Property Public Property Address1() As String Get Return _Address1 End Get Set(ByVal value As String) If value <> _Address1 Then _IsDirty = True End If _Address1 = value End Set End Property Public Property Address2() As String Get Return _Address2 End Get Set(ByVal value As String) If value <> _Address2 Then _IsDirty = True End If _Address2 = value End Set End Property Public Property City() As String Get Return _City End Get Set(ByVal value As String) If value <> _City Then _