Search Results

Search found 1163 results on 47 pages for 'quote'.

Page 4/47 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to change identifier quote character in SSIS for connection to ODBC DSN

    - by William Rose
    I'm trying to create an SSIS 2008 Data Source View that reads from an Ingres database via the ODBC driver for Ingres. I've downloaded the Ingres 10 Community Edition to get the ODBC driver, installed it, set up the data access server and a DSN on the server running SSIS. If I connect to the SQL Server 2008 Database Engine on the server running SSIS, I can retrieve data from Ingres over the ODBC DSN by running the following command: SELECT * FROM OPENROWSET( 'MSDASQL' , 'DSN=IngresODBC;UID=testuser;PWD=testpass' , 'SELECT * FROM iitables') So I am quite sure that the ODBC setup is correct. If I try the same query with SQL Server style bracketed identifier quotes, I get an error, as Ingres doesn't support this syntax. SELECT * FROM OPENROWSET( 'MSDASQL' , 'DSN=IngresODBC;UID=testuser;PWD=testpass' , 'SELECT * FROM [iitables]') The error is "[Ingres][Ingres 10.0 ODBC Driver][Ingres 10.0]line 1, Unexpected character '['.". What I am finding is that I get the same error when I try to add tables from Ingres to an SSIS Data Source View. The initial step of selecting the ODBC Provider works fine, and I am shown a list of tables / views to add. I then select any table, and try to add it to the view, and get "ERROR [5000A] [Ingres][Ingres 10.0 ODBC Driver][Ingres 10.0]line 3, Unexpected character '['.". Following Ed Harper's suggestion of creating a named query also seems to be stymied. If I put into my named query the following text: SELECT * FROM "iitables" I still get an error: "ERROR [5000A] [Ingres][Ingres 10.0 ODBC Driver][Ingres 10.0]line 2, Unexpected character '['". According to the error, the query text passed by SSIS to ODBC was: SELECT [iitables].* FROM ( SELECT * FROM "iitables" ) AS [iitables] It seems that SSIS assumes that bracket quote characters are acceptable, when they aren't. How can I persuade it not to use them? Double quotes are acceptable.

    Read the article

  • PHP Json Encoding w/ quote escaping in 5.2?

    - by NickAldwin
    I'm playing with the flickr api and php. I want to pass some information from PHP to Javascript through Ajax. I have the following code: json_encode($pics); which results in the following example JSON string: [{"id":"4363603591","title":"blue, white and red...another seattle view","date_faved":"1266379499"},{"id":"4004908219","title":"\u201cI just told you my dreams and you made me see that I could walk into the sun and I could still be me and now I can't deny nothing lasts forever.\u201d","date_faved":"1259987670"}] Javascript has problems with this, however, due to the unescaped single-quote in the second item ("can't deny"). I want to use the function json_encode with the options parameter to make it strip the quotes, but that's only available in PHP 5.3, and I'm running 5.2 (not my server). Is there a fast way to run through the entire array and escape everything before encoding it in Json? I looked for a way to do this, but it all seems to deal with encoding it as the data is generated, something I cannot do as I'm not the one generating the data. If it helps, I'm currently using the following javascript after the ajax request: var photos = eval('(' + resptxt + ')');

    Read the article

  • How do you keep SOA DRY?

    - by TaylorOtwell
    In our organization, we've shifted to a more "service oriented architecture". To give an example, let's assume we need to retrieve a "Quote" object. This quote has a shipper, a consignee, phone numbers, contacts, email addresses, and other location information. In other words, a Quote object is made up of many other objects. So, it seems like it would make sense to make a "Quote Retrieval Service". In our situation, we've accomplished this by creating a .NET solution and writing the service. The service API looks something like this (in pseudo-code): Function GetQuote(String ID) Returns Quote So, so far so good. Now, when this service is consumed, to keep things "de-coupled", we are creating essentially a duplicate of the Quote object and mapping from the QuoteService version of the Quote into the consumer's version of the Quote. In many cases, these classes will have the exact same properties. So, if the Quote service is consumed by 5 other applications, we would have 6 definitions of what a "Quote" is. One for each consumer, and one for the service. This feels wrong. I thought code was supposed to be DRY, but it seems like our method of SOA is forcing us to create tons of duplicated class definitions. What are we doing wrong, or is the code duplication just a "necessary evil" of SOA?

    Read the article

  • Sending double quote character to CreateProcess?

    - by karikari
    I want to send the double quote character to my CreateProcess function. How can I do the correct way? I want to send all of this characters: "%h" CreateProcess(L"C:\\identify -format ",L"\"%h\" trustedsnapshot.png",0,0,TRUE,NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW,0,0,&sInfo,&pInfo); Here is the full code: int ExecuteExternalFile() { SECURITY_ATTRIBUTES secattr; ZeroMemory(&secattr,sizeof(secattr)); secattr.nLength = sizeof(secattr); secattr.bInheritHandle = TRUE; HANDLE rPipe, wPipe; //Create pipes to write and read data CreatePipe(&rPipe,&wPipe,&secattr,0); STARTUPINFO sInfo; ZeroMemory(&sInfo,sizeof(sInfo)); PROCESS_INFORMATION pInfo; ZeroMemory(&pInfo,sizeof(pInfo)); sInfo.cb=sizeof(sInfo); sInfo.dwFlags=STARTF_USESTDHANDLES; sInfo.hStdInput=NULL; sInfo.hStdOutput=wPipe; sInfo.hStdError=wPipe; CreateProcess(L"C:\\identify",L" -format \"%h\" trustedsnapshot.png",0,0,TRUE,NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW,0,0,&sInfo,&pInfo); CloseHandle(wPipe); char buf[100]; DWORD reDword; CString m_csOutput,csTemp; BOOL res; do { res=::ReadFile(rPipe,buf,100,&reDword,0); csTemp=buf; m_csOutput+=csTemp.Left(reDword); }while(res); //return m_csOutput; float fvar; //fvar = atof((const char *)(LPCTSTR)(m_csOutput)); ori //fvar=atof((LPCTSTR)m_csOutput); fvar = _tstof(m_csOutput); const size_t len = 256; wchar_t buffer[len] = {}; _snwprintf(buffer, len - 1, L"%d", fvar); MessageBox(NULL, buffer, L"test print createprocess value", MB_OK); return fvar; } I need this function to return the integer value from the CreateProcess.

    Read the article

  • Javascript BBcode function not working

    - by Dave
    I have a string I want to convert to divs but it doesn't close the div properly. The example string i am using is this: [quote]Quote by: user1 [quote]Quote by: user2 ads[/quote]Test[/quote]Testing 2. This results in: <div class="quote" style="margin-left:10px;margin-top:10px;"> Quote by: user1 [quote]Quote by: user2 ads </div> Test[/quote]Testing 2. But it will not convert the internal quotes properly. My Javascript function is like this: function bbcode_parser(str) { search = new Array( /\[b\](.*?)\[\/b\]/g, /\[i\](.*?)\[\/i\]/g, /\[quote](.*?)\[\/quote\]/g, /\[\*\]\s?(.*?)\n/g); replace = new Array( "<strong>$1</strong>", "<em>$1</em>", "<div class='quote' style='margin-left:10px;margin-top:10px;'>$1</div>"); for (i = 0; i < search.length; i++) { str = str.replace(search[i], replace[i]); } return str; } I have provided a JSFiddle for you to see it in action: http://jsfiddle.net/gRaFW/2/ Please help :)

    Read the article

  • iPhone Objective-C Simplest Way to get a stock quote

    - by norskben
    Hi guys Im wondering what is the simplest way to get the current price of a stock from say yahoo finance (or similar) in objective-C For the iPhone SDK. Simple is the key, I am looking for current price, and days movement. I havent had much luck finding an iPhone code example or library. regards

    Read the article

  • unwanted quote marks in output from printf

    - by Gary
    I have some address data which has been exported from a database. If the address had multiple lines, the exported data has joined all the lines into one string with the former lines being separated by dollars signs. Here's one of the addresses: INFORMATION DELIVERY DEPT$704 CHERRY ST$ATLANTA, GA 30332-0900 I'm splitting this into an array on the dollar sign and outputting the three array elements into separate tab-separated fields with printf. For some reason, it comes out like this: INFORMATION DELIVERY DEPT 704 CHERRY ST "ATLANTA, GA 30332-0900" I don't want the quotes around that final field. Can anyone explain why this is happening and how to suppress it? This is being done in Windows Vista with gawk3.1.6. Thanks! gary

    Read the article

  • html source encode

    - by Joseph
    when I view source on my php page I get &quot; for a quote. But instead, I would like " to be used in the source code. I have no control over manually replacing it so Im wondering if there is a function to do such a thing.

    Read the article

  • Quote POSIX shell special characters in Python output

    - by ??O?????
    There are times that I automagically create small shell scripts from Python, and I want to make sure that the filename arguments do not contain non-escaped special characters. I've rolled my own solution, that I will provide as an answer, but I am almost certain I've seen such a function lost somewhere in the standard library. By “lost” I mean I didn't find it in an obvious module like shlex, cmd or subprocess. Do you know of such a function in the stdlib?

    Read the article

  • Escape Quote in C# for javascript consumption

    - by Jason
    I have a ASP.Net web handler that returns results of a query in JSON format public static String dt2JSON(DataTable dt) { String s = "{\"rows\":["; if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { s += "{"; for (int i = 0; i < dr.Table.Columns.Count; i++) { s += "\"" + dr.Table.Columns[i].ToString() + "\":\"" + dr[i].ToString() + "\","; } s = s.Remove(s.Length - 1, 1); s += "},"; } s = s.Remove(s.Length - 1, 1); } s += "]}"; return s; } The problem is that sometimes the data returned has quotes in it and I would need to javascript-escape these so that it can be properly created into a js object. I need a way to find quotes in my data (quotes aren't there every time) and place a "/" character in front of them. Example response text (wrong): {"rows":[{"id":"ABC123","length":"5""}, {"id":"DEF456","length":"1.35""}, {"id":"HIJ789","length":"36.25""}]} I would need to escape the " so my response should be: {"rows":[{"id":"ABC123","length":"5\""}, {"id":"DEF456","length":"1.35\""}, {"id":"HIJ789","length":"36.25\""}]} Also, I'm pretty new to C# (coding in general really) so if something else in my code looks silly let me know.

    Read the article

  • ahow can I resolve Django Error: str' object has no attribute 'autoescape'?

    - by Angelbit
    Hi have tried to create a inclusion tag on Django but don't work and return str' object has no attribute 'autoescape' this is the code of custom tag: from django import template from quotes.models import Quotes register = template.Library() def show_quote(): quote = Quotes.objects.values('quote', 'author').get(id=0) return {'quote': quote['quote']} register.inclusion_tag('quotes.html')(show_quote) EDIT: Quote class from django.db import models class Quotes(models.Model): quote = models.CharField(max_length=255) author = models.CharField(max_length=100) class Meta: db_table = 'quotes' quotes.html <blockquote id="quotes">{{ quote }}</blockquote>

    Read the article

  • My windows keyboard is being "clever" with the quote keys - how can I stop it?

    - by Marcin
    I'm using windows 7 on a laptop. On the laptop keyboard, for some reason, the quote key (which has both double and single quote on it) is doing some "clever" annoying things: When I press single-quote (or double-quote), windows doesn't send any characters until I press it twice (resulting in '' or "") When I press it before a vowel, I get some kind of accented character. As I usually only write English, this is annoying. The backtick/tilde key is subject to similar behaviour. I have not attempted to set up my computer to process anything other than English. My keyboard appears to be (in so far as these things are standard on laptops) a standard US qwerty keyboard. How can I stop this happening?

    Read the article

  • Passing a Batch File an Argument Containing a Quote Containing a Space

    - by Synetech inc.
    Hi, On many occasions I have dealt with passing batch files arguments with spaces, quotes, percents, and slashes and all sorts of combinations of them. Usually I managed to figure out how to accomplish what I want, but this time I am stuck. I have tried a couple of hundred combinations now and my head is starting to hurt. I’ve reduced the problem quite nicely. It’s a simple requirement: pass a double-quoted space from one batch file to another. That is, one batch file should pass some string X to another so that the the second one echos " ". I just can’t figure out what X should be. Here is a minimal batch file that demonstrates and attempt that does not work. (This BAT file takes the place of both by calling itself.) ::Goal is to print: ::" " ::That is, to pass a quoted space from a BAT file to a BAT file if not (%1)==() goto recurse %0 "" "" :recurse echo %1 pause It does not work. I’ve tried using "\" \"", """ """, """" """", "\"" "\"", ""\" \""", "^" ^"", ^"" "^", and so on. Either they print double double-quotes, lose everything after the space, or something else (that is wrong). Any ideas? Thanks.

    Read the article

  • escape double quote in vb string

    - by JKS
    i have used following piece of code to execute schtasks command from vb6 while executing it ignores folder if it contains space For example "C:\program files\test\test.exe" will be converted to "c:\program " how do i solve this issue? MyAppname = Chr(34) & App.Path & "\" & App.EXEName & ".exe" & Chr(34) StrCommand = "schtasks /create /sc ONLOGON /RL HIGHEST /tn myapp /tr " & MyAppname Shell StrCommand, vbHide thanks in advance

    Read the article

  • quasiquote/quote in lua?

    - by anon
    In Lisp, I can have: (a b c d e f g) which means look up b, c, d, e, f, g look up a; apply value of a to above Then, I can also have: `(a b c d e f g) which is the equiv to (list 'a 'b 'c 'd 'e 'f 'g) Now, in lua, I can have: [snipplet 1] foo = { Foo, {Cat, cat}, {Dog, dog} }; Which ends up most likely expanding into: { nil, { nil, nil}, {nil, nil}} Whereas what I really want is something like: [snipplet 2] { "Foo", {"Cat", "cat"}, {"Dog", "dog"}} Is there some backquote-like method in lua? I find [snipplet 1] to be more visually pleasing than [snipplet 2], but what I mean is snipplet 2. Thanks!

    Read the article

  • Random Quote in html using codeignitor

    - by user1503606
    I am getting random quotes in my html see image below, and i cant for the life of me figure out how to get rid of them i have traced it right back to my model and their are now quotes there, i have also compressed all my code and there is still quotes??? Any one had this bug??? heres my php <ul><?php foreach ($account_media as $value) : ?><li class="span2"></li>?<?php endforeach; ?></ul> i am using codeignitor

    Read the article

  • What did Stallman mean in this quote about implementing other languages in Lisp?

    - by Charlie Flowers
    I just read the following quote from Stallman as part of a speech he gave many years ago. He's talking about how it is feasible to implement other programming languages in Lisp, but not feasible to implement Lisp in those other programming languages. He seems to take for granted that the listeners/readers understand why. But I don't see why. I think the answer will explain something about Lisp to me, and I'd like to understand it. Can someone explain it? Here's the quote: "There's an interesting benefit you can get from using such a powerful language as a version of Lisp as your primary extensibility language. You can implement other languages by translating them into your primary language. If your primary language is TCL, you can't very easily implement Lisp by translating it into TCL. But if your primary language is Lisp, it's not that hard to implement other things by translating them." The full speech is here: http://www.gnu.org/gnu/rms-lisp.html Thanks.

    Read the article

  • "more than 3 levels of indentation, you're screwed" How should I understand this quote ?

    - by jokoon
    The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. What can I deduct from this quote ? On top of the fact that too long methods are hard to maintain, are they hard or impossible to optimize for the compiler ? I don't really understand if this quote encourages better coding practice or is really a mathematical/algorithmic sort of truth... I also read in some C++ optimizing guide that dividing up a program into more function improves its design is a common thing taught at school, but it should be not done too much, since it can turn into a lot of JMP calls (even if the compiler can inline some methods by itself).

    Read the article

  • Software developer trying to charge us $4,000 for a quoted project of $1,600. What options do I have

    - by Tom Jones
    This is totally out in left field... but I'm grasping at straws here... We hired a software developer and later found out he lives in Pakistan. He quoted us $1,600 for a project… and now that the project is done, he sent us a bill for $4,000. He didn't let us know he went over the quote… he just continued working without notifying us. Now he expects us to pay the $4,000 when he originally told us, via email, that it would NOT be more than $1,600. What options do I have?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >